Skip to content

Commit

Permalink
BREAKING rename net.app.protocol.(name|version) to `net.protocol.(n…
Browse files Browse the repository at this point in the history
…ame|version)` and replace `http.flavor` with `net.protocol.(name|version)` (open-telemetry#3272)
  • Loading branch information
trask authored Mar 10, 2023
1 parent c2c72d6 commit 63715c6
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 128 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ release.

- Fix grammatical number of metric units.
([#3298](https://github.com/open-telemetry/opentelemetry-specification/pull/3298))
- Rename `net.app.protocol.(name|version)` to `net.protocol.(name|version)`
([#3272](https://github.com/open-telemetry/opentelemetry-specification/pull/3272))
- Replace `http.flavor` with `net.protocol.(name|version)`
([#3272](https://github.com/open-telemetry/opentelemetry-specification/pull/3272))

### Compatibility

Expand Down
89 changes: 89 additions & 0 deletions schemas/1.20.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
file_format: 1.1.0
schema_url: https://opentelemetry.io/schemas/1.20.0
versions:
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:
31 changes: 6 additions & 25 deletions semantic_conventions/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,12 @@ 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]
- id: flavor
type:
# Default value: `true`. If false, it helps the code gen tool to
# encode checks that only accept the listed values.
allow_custom_values: true
members:
- id: http_1_0
value: '1.0'
brief: 'HTTP/1.0'
- id: http_1_1
value: '1.1'
brief: 'HTTP/1.1'
- id: http_2_0
value: '2.0'
brief: 'HTTP/2'
- id: http_3_0
value: '3.0'
brief: 'HTTP/3'
- id: spdy
value: 'SPDY'
brief: 'SPDY protocol.'
- id: quic
value: 'QUIC'
brief: 'QUIC protocol.'
brief: 'Kind of HTTP protocol used.'
- ref: net.protocol.name
examples: ['http', 'spdy']
requirement_level:
recommended: if not default (`http`).
- ref: net.protocol.version
examples: ['1.0', '1.1', '2.0']

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

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

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

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

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

- id: metric.http.client.response.size
Expand All @@ -115,5 +120,6 @@ groups:
attributes:
- ref: http.method
- ref: http.status_code
- ref: http.flavor
- ref: net.protocol.name
- ref: net.protocol.version
- ref: net.sock.peer.addr
6 changes: 3 additions & 3 deletions semantic_conventions/trace/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ groups:
brief: 'Something else (non IP-based).'
brief: >
Transport protocol used. See note below.
- id: app.protocol.name
- id: protocol.name
type: string
brief: 'Application layer protocol used. The value SHOULD be normalized to lowercase.'
examples: ['amqp', 'http', 'mqtt']
- id: app.protocol.version
- id: protocol.version
type: string
brief: 'Version of the application layer protocol used. See note below.'
examples: '3.1.1'
note: >
`net.app.protocol.version` refers to the version of the protocol used and might be
`net.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
Expand Down
4 changes: 2 additions & 2 deletions semantic_conventions/trace/messaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ groups:
tag: connection-level
requirement_level:
recommended: If different than `net.peer.name` and if `net.sock.peer.addr` is set.
- ref: net.app.protocol.name
- ref: net.protocol.name
examples: ['amqp', 'mqtt']
- ref: net.app.protocol.version
- ref: net.protocol.version
constraints:
- include: network

Expand Down
Loading

0 comments on commit 63715c6

Please sign in to comment.