Skip to content

Commit

Permalink
Add http.flavor and http.user_agent to list of deprecated attribu…
Browse files Browse the repository at this point in the history
…tes (#503)

Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
  • Loading branch information
trask and AlexanderWert authored Nov 12, 2023
1 parent e2952cf commit cfdcc9e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ release.

- Add `code.stacktrace` attribute
([#435](https://github.com/open-telemetry/semantic-conventions/pull/435))
- Add `http.flavor` and `http.user_agent` to list of deprecated attributes
([#503](https://github.com/open-telemetry/semantic-conventions/pull/503))

### Fixes

Expand Down
13 changes: 13 additions & 0 deletions docs/attributes-registry/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,24 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin
<!-- semconv attributes.http.deprecated(omit_requirement_level) -->
| Attribute | Type | Description | Examples |
|---|---|---|---|
| `http.flavor` | string | Deprecated, use `network.procol.name` instead. | `1.0` |
| `http.method` | string | Deprecated, use `http.request.method` instead. | `GET`; `POST`; `HEAD` |
| `http.request_content_length` | int | Deprecated, use `http.request.header.content-length` instead. | `3495` |
| `http.response_content_length` | int | Deprecated, use `http.response.header.content-length` instead. | `3495` |
| `http.scheme` | string | Deprecated, use `url.scheme` instead. | `http`; `https` |
| `http.status_code` | int | Deprecated, use `http.response.status_code` instead. | `200` |
| `http.target` | string | Deprecated, use `url.path` and `url.query` instead. | `/search?q=OpenTelemetry#SemConv` |
| `http.url` | string | Deprecated, use `url.full` instead. | `https://www.foo.bar/search?q=OpenTelemetry#SemConv` |
| `http.user_agent` | string | Deprecated, use `user_agent.original` instead. | `CERN-LineMode/2.15 libwww/2.17b3`; `Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1` |

`http.flavor` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.

| Value | Description |
|---|---|
| `1.0` | HTTP/1.0 |
| `1.1` | HTTP/1.1 |
| `2.0` | HTTP/2 |
| `3.0` | HTTP/3 |
| `SPDY` | SPDY protocol. |
| `QUIC` | QUIC protocol. |
<!-- endsemconv -->
30 changes: 30 additions & 0 deletions model/registry/deprecated/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,33 @@ groups:
brief: 'Deprecated, use `http.response.header.content-length` instead.'
stability: deprecated
examples: 3495
- id: flavor
type:
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: 'Deprecated, use `network.procol.name` instead.'
stability: deprecated
- id: user_agent
type: string
brief: 'Deprecated, use `user_agent.original` instead.'
examples: ['CERN-LineMode/2.15 libwww/2.17b3',
'Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1']
stability: deprecated

0 comments on commit cfdcc9e

Please sign in to comment.