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 net.app.protocol.(name|version) to net.protocol.(name|version) and replace http.flavor with net.protocol.(name|version) #3272

Merged
merged 15 commits into from
Mar 10, 2023
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ release.
([#3220](https://github.com/open-telemetry/opentelemetry-specification/pull/3220))
- Remove mention of `net.transport` from HTTP semantic conventions
([#3244](https://github.com/open-telemetry/opentelemetry-specification/pull/3244))
- Rename `net.app.transport.(name|version)` to `net.transport.(name|version)`
trask marked this conversation as resolved.
Show resolved Hide resolved
([#3272](https://github.com/open-telemetry/opentelemetry-specification/pull/3272))
- Replace `http.flavor` with `net.transport.(name|version)`
trask marked this conversation as resolved.
Show resolved Hide resolved
([#3272](https://github.com/open-telemetry/opentelemetry-specification/pull/3272))

### Compatibility

Expand Down
29 changes: 4 additions & 25 deletions semantic_conventions/http-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,10 @@ 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', 'quic']
trask marked this conversation as resolved.
Show resolved Hide resolved
- 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.'
reyang marked this conversation as resolved.
Show resolved Hide resolved
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