Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Rename remaining network attributes from net.* to network.* and align definitions with ECS #3426

Merged
merged 25 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ release.
([#3388](https://github.com/open-telemetry/opentelemetry-specification/pull/3388))
- Change http.server.duration and http.client.duration units to seconds
([#3390](https://github.com/open-telemetry/opentelemetry-specification/pull/3390))
- Rename `net.protocol.*` to `network.protocol.*`,
`net.transport` to `network.transport`,
`net.sock.family` to `network.socket.family`,
`net.host.connection.*` to `network.host.connection.*`, and
`net.host.carrier.*` to `network.host.carrier.*`
([#3426](https://github.com/open-telemetry/opentelemetry-specification/pull/3426))

### Compatibility

Expand Down
105 changes: 105 additions & 0 deletions schemas/1.21.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
file_format: 1.1.0
schema_url: https://opentelemetry.io/schemas/1.21.0
versions:
1.21.0:
spans:
changes:
# https://github.com/open-telemetry/opentelemetry-specification/pull/3426
- rename_attributes:
attribute_map:
net.protocol.name: network.protocol.name
net.protocol.version: network.protocol.version
net.transport: network.transport
net.sock.family: network.socket.family
net.host.connection.type: network.host.connection.type
net.host.connection.subtype: network.host.connection.subtype
net.host.carrier.name: network.host.carrier.name
net.host.carrier.mcc: network.host.carrier.mcc
net.host.carrier.mnc: network.host.carrier.mnc
net.host.carrier.icc: network.host.carrier.icc
trask marked this conversation as resolved.
Show resolved Hide resolved
1.20.0:
spans:
changes:
# https://github.com/open-telemetry/opentelemetry-specification/pull/3272
- rename_attributes:
attribute_map:
net.app.protocol.name: net.protocol.name
net.app.protocol.version: net.protocol.version
1.19.0:
spans:
changes:
# https://github.com/open-telemetry/opentelemetry-specification/pull/3209
- rename_attributes:
attribute_map:
faas.execution: faas.invocation_id
# https://github.com/open-telemetry/opentelemetry-specification/pull/3188
- rename_attributes:
attribute_map:
faas.id: cloud.resource_id
# https://github.com/open-telemetry/opentelemetry-specification/pull/3190
- rename_attributes:
attribute_map:
http.user_agent: user_agent.original
resources:
changes:
# https://github.com/open-telemetry/opentelemetry-specification/pull/3190
- rename_attributes:
attribute_map:
browser.user_agent: user_agent.original
1.18.0:
1.17.0:
spans:
changes:
# https://github.com/open-telemetry/opentelemetry-specification/pull/2957
- rename_attributes:
attribute_map:
messaging.consumer_id: messaging.consumer.id
messaging.protocol: net.app.protocol.name
messaging.protocol_version: net.app.protocol.version
messaging.destination: messaging.destination.name
messaging.temp_destination: messaging.destination.temporary
messaging.destination_kind: messaging.destination.kind
messaging.message_id: messaging.message.id
messaging.conversation_id: messaging.message.conversation_id
messaging.message_payload_size_bytes: messaging.message.payload_size_bytes
messaging.message_payload_compressed_size_bytes: messaging.message.payload_compressed_size_bytes
messaging.rabbitmq.routing_key: messaging.rabbitmq.destination.routing_key
messaging.kafka.message_key: messaging.kafka.message.key
messaging.kafka.partition: messaging.kafka.destination.partition
messaging.kafka.tombstone: messaging.kafka.message.tombstone
messaging.rocketmq.message_type: messaging.rocketmq.message.type
messaging.rocketmq.message_tag: messaging.rocketmq.message.tag
messaging.rocketmq.message_keys: messaging.rocketmq.message.keys
messaging.kafka.consumer_group: messaging.kafka.consumer.group
1.16.0:
1.15.0:
spans:
changes:
# https://github.com/open-telemetry/opentelemetry-specification/pull/2743
- rename_attributes:
attribute_map:
http.retry_count: http.resend_count
1.14.0:
1.13.0:
spans:
changes:
# https://github.com/open-telemetry/opentelemetry-specification/pull/2614
- rename_attributes:
attribute_map:
net.peer.ip: net.sock.peer.addr
net.host.ip: net.sock.host.addr
1.12.0:
1.11.0:
1.10.0:
1.9.0:
1.8.0:
spans:
changes:
- rename_attributes:
attribute_map:
db.cassandra.keyspace: db.name
db.hbase.namespace: db.name
1.7.0:
1.6.1:
1.5.0:
1.4.0:
4 changes: 2 additions & 2 deletions semantic_conventions/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ groups:
conditionally_required: If and only if one was received/sent.
brief: '[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).'
examples: [200]
- ref: net.protocol.name
- ref: network.protocol.name
examples: ['http', 'spdy']
requirement_level:
recommended: if not default (`http`).
- ref: net.protocol.version
- ref: network.protocol.version
examples: ['1.0', '1.1', '2.0']

- id: attributes.http.client
Expand Down
24 changes: 12 additions & 12 deletions semantic_conventions/metrics/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ groups:
# todo (lmolkova) build tools don't populate grandparent attributes
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version

- id: metric.http.server.active_requests
type: metric
Expand Down Expand Up @@ -62,8 +62,8 @@ groups:
# todo (lmolkova) build tools don't populate grandparent attributes
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version

- id: metric.http.server.response.size
type: metric
Expand All @@ -76,8 +76,8 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version

- id: metric.http.client.duration
type: metric
Expand All @@ -89,8 +89,8 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version
- ref: net.sock.peer.addr

- id: metric.http.client.request.size
Expand All @@ -104,8 +104,8 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version
- ref: net.sock.peer.addr

- id: metric.http.client.response.size
Expand All @@ -119,6 +119,6 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: net.protocol.name
- ref: net.protocol.version
- ref: network.protocol.name
- ref: network.protocol.version
- ref: net.sock.peer.addr
4 changes: 2 additions & 2 deletions semantic_conventions/trace/database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ groups:
tag: connection-level
- ref: net.sock.peer.port
tag: connection-level
- ref: net.sock.family
- ref: network.socket.family
tag: connection-level
- ref: net.sock.peer.name
requirement_level:
recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set.
- ref: net.transport
- ref: network.transport
tag: connection-level
requirement_level:
conditionally_required: If database type is in-process (`"inproc"`), recommended for other database types.
Expand Down
34 changes: 17 additions & 17 deletions semantic_conventions/trace/general.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
groups:
- id: network-core
prefix: net
# TODO (trask) bring back prefix after https://github.com/open-telemetry/opentelemetry-specification/pull/3402
type: attribute_group
brief: >
These attributes may be used for any network related operation.
attributes:
- id: transport
- id: network.transport
type:
allow_custom_values: true
members:
Expand All @@ -28,37 +28,37 @@ groups:
brief: 'Something else (non IP-based).'
brief: >
Transport protocol used. See note below.
- id: protocol.name
- id: network.protocol.name
trask marked this conversation as resolved.
Show resolved Hide resolved
type: string
brief: 'Application layer protocol used. The value SHOULD be normalized to lowercase.'
examples: ['amqp', 'http', 'mqtt']
- id: protocol.version
- id: network.protocol.version
type: string
brief: 'Version of the application layer protocol used. See note below.'
examples: '3.1.1'
note: >
`net.protocol.version` refers to the version of the protocol used and might be
`network.protocol.version` refers to the version of the protocol used and might be
different from the protocol client's version. If the HTTP client used has a version
of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.
- id: sock.peer.name
- id: net.sock.peer.name
type: string
brief: Remote socket peer name.
requirement_level:
recommended: If available and different from `net.peer.name` and if `net.sock.peer.addr` is set.
examples: proxy.example.com
- id: sock.peer.addr
- id: net.sock.peer.addr
type: string
brief: >
Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local communication,
[etc](https://man7.org/linux/man-pages/man7/address_families.7.html).
examples: ['127.0.0.1', '/tmp/mysql.sock' ]
- id: sock.peer.port
- id: net.sock.peer.port
type: int
brief: Remote socket peer port.
requirement_level:
recommended: If defined for the address family and if different than `net.peer.port` and if `net.sock.peer.addr` is set.
examples: 16456
- id: sock.family
- id: network.socket.family
type:
allow_custom_values: true
members:
Expand All @@ -75,41 +75,41 @@ groups:
conditionally_required: >
If different than `inet` and if any of `net.sock.peer.addr` or `net.sock.host.addr` are set.
Consumers of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in `net.sock.peer.addr`
if `net.sock.family` is not set. This is to support instrumentations that follow previous versions
if `network.socket.family` is not set. This is to support instrumentations that follow previous versions
of this document.
brief: >
Protocol [address family](https://man7.org/linux/man-pages/man7/address_families.7.html) which is used for communication.
examples: ['inet6', 'bluetooth']
- id: peer.name
- id: net.peer.name
type: string
brief: 'Logical remote hostname, see note below.'
examples: 'example.com'
note: >
`net.peer.name` SHOULD NOT be set if capturing it would require an extra DNS lookup.
- id: peer.port
- id: net.peer.port
type: int
brief: 'Logical remote port number'
examples: [80, 8080, 443]
- id: host.name
- id: net.host.name
type: string
brief: 'Logical local hostname or similar, see note below.'
examples: 'localhost'
- id: host.port
- id: net.host.port
type: int
brief: 'Logical local port number, preferably the one that the peer used to connect'
examples: 8080
- id: sock.host.addr
- id: net.sock.host.addr
type: string
brief: Local socket address. Useful in case of a multi-IP host.
examples: '192.168.0.1'
- id: sock.host.port
- id: net.sock.host.port
type: int
brief: 'Local socket port number.'
requirement_level:
conditionally_required: If defined for the address family and if different than `net.host.port` and if `net.sock.host.addr` is set. In other cases, it is still recommended to set this.
examples: 35555
- id: network-connection-and-carrier
prefix: net
prefix: network
type: attribute_group
brief: >
These attributes may be used for any network related operation.
Expand Down
2 changes: 1 addition & 1 deletion semantic_conventions/trace/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ groups:
- ref: net.sock.peer.addr
- ref: net.sock.peer.port
- ref: net.sock.peer.name
- ref: net.sock.family
- ref: network.socket.family
examples: ['inet', 'inet6']
- ref: user_agent.original

Expand Down
6 changes: 3 additions & 3 deletions semantic_conventions/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ groups:
tag: connection-level
- ref: net.sock.peer.port
tag: connection-level
- ref: net.sock.family
- ref: network.socket.family
tag: connection-level
- ref: net.sock.peer.name
tag: connection-level
requirement_level:
recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set.
- ref: net.protocol.name
- ref: network.protocol.name
examples: ['amqp', 'mqtt']
- ref: net.protocol.version
- ref: network.protocol.version

- id: messaging.producer
prefix: messaging
Expand Down
6 changes: 3 additions & 3 deletions semantic_conventions/trace/rpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ groups:
- ref: net.sock.peer.port
requirement_level:
recommended: If different than `net.peer.port` and if `net.sock.peer.addr` is set.
- ref: net.sock.family
- ref: network.socket.family
requirement_level:
conditionally_required: If and only if `net.sock.peer.addr` is set.
- ref: net.sock.peer.name
Expand All @@ -70,7 +70,7 @@ groups:
- ref: net.peer.port
requirement_level:
conditionally_required: See below
- ref: net.transport
- ref: network.transport
requirement_level:
conditionally_required: See below
constraints:
Expand All @@ -88,7 +88,7 @@ groups:
- ref: net.host.name
- ref: net.sock.host.addr
- ref: net.sock.host.port
- ref: net.sock.family
- ref: network.socket.family

- id: rpc.grpc
prefix: rpc.grpc
Expand Down
2 changes: 1 addition & 1 deletion specification/common/attribute-requirement-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For example, Metric attributes that may have high cardinality can only be define

A semantic convention that refers to an attribute from another semantic convention MAY modify the requirement level within its own scope. Otherwise, requirement level from the referred semantic convention applies.

For example, [Database semantic convention](../trace/semantic_conventions/database.md) references `net.transport` attribute defined in [General attributes](../trace/semantic_conventions/span-general.md) with `Conditionally Required` level on it.
For example, [Database semantic convention](../trace/semantic_conventions/database.md) references `network.transport` attribute defined in [General attributes](../trace/semantic_conventions/span-general.md) with `Conditionally Required` level on it.

## Required

Expand Down
Loading