Skip to content

Commit 5ecc384

Browse files
feat(http): migrate HTTP conventions to Weaver schema v2
1 parent b51e2a6 commit 5ecc384

9 files changed

Lines changed: 612 additions & 444 deletions

File tree

.chloggen/migrate-http-v2.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
change_type: enhancement
2+
component: http
3+
note: Migrate HTTP semantic conventions to Weaver v2 schema
4+
issues: [3809]

docs/registry/attributes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Currently, the following namespaces exist:
7171
- [Hardware](hardware.md)
7272
- [Heroku](heroku.md)
7373
- [Host](host.md)
74-
- [HTTP](http.md)
7574
- [iOS](ios.md)
7675
- [JSONRPC](jsonrpc.md)
7776
- [JVM](jvm.md)
@@ -81,6 +80,7 @@ Currently, the following namespaces exist:
8180
- [Mainframe](mainframe.md)
8281
- [MCP](mcp.md)
8382
- [Messaging](messaging.md)
83+
- [Model](model.md)
8484
- [Network](network.md)
8585
- [NFS](nfs.md)
8686
- [NodeJS](nodejs.md)

docs/registry/attributes/model.md

Lines changed: 146 additions & 0 deletions
Large diffs are not rendered by default.

model/http/common.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
groups:
1+
file_format: definition/2
2+
3+
attribute_groups:
24
- id: attributes.http.common
3-
type: attribute_group
4-
brief: "Describes HTTP attributes."
5+
visibility: internal
56
attributes:
67
- ref: http.request.method
78
requirement_level: required
@@ -37,10 +38,9 @@ groups:
3738
examples: ['1.0', '1.1', '2', '3']
3839

3940
- id: attributes.http.client
40-
type: attribute_group
41-
brief: 'HTTP Client attributes'
42-
extends: attributes.http.common
41+
visibility: internal
4342
attributes:
43+
- ref_group: attributes.http.common
4444
- ref: server.address
4545
requirement_level: required
4646
note: |
@@ -68,10 +68,9 @@ groups:
6868
The `url.template` MUST have low cardinality. It is not usually available on HTTP clients, but may be known by the application or specialized HTTP instrumentation.
6969
7070
- id: attributes.http.server
71-
type: attribute_group
72-
brief: 'HTTP Server attributes'
73-
extends: attributes.http.common
71+
visibility: internal
7472
attributes:
73+
- ref_group: attributes.http.common
7574
- ref: http.route
7675
requirement_level:
7776
conditionally_required: If and only if it's available
Lines changed: 150 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,150 @@
1-
groups:
2-
- id: registry.http.deprecated
3-
type: attribute_group
4-
display_name: Deprecated HTTP Attributes
5-
brief: "Describes deprecated HTTP attributes."
6-
attributes:
7-
- id: http.method
8-
type: string
9-
brief: 'Deprecated, use `http.request.method` instead.'
10-
stability: development
11-
deprecated:
12-
reason: renamed
13-
renamed_to: http.request.method
14-
examples: ["GET", "POST", "HEAD"]
15-
- id: http.status_code
16-
type: int
17-
brief: 'Deprecated, use `http.response.status_code` instead.'
18-
stability: development
19-
deprecated:
20-
reason: renamed
21-
renamed_to: http.response.status_code
22-
examples: [200]
23-
- id: http.scheme
24-
type: string
25-
brief: 'Deprecated, use `url.scheme` instead.'
26-
stability: development
27-
deprecated:
28-
reason: renamed
29-
renamed_to: url.scheme
30-
examples: ['http', 'https']
31-
- id: http.url
32-
type: string
33-
brief: 'Deprecated, use `url.full` instead.'
34-
stability: development
35-
deprecated:
36-
reason: renamed
37-
renamed_to: url.full
38-
examples: ['https://www.foo.bar/search?q=OpenTelemetry#SemConv']
39-
- id: http.target
40-
type: string
41-
brief: 'Deprecated, use `url.path` and `url.query` instead.'
42-
stability: development
43-
deprecated:
44-
reason: obsoleted
45-
note: Split to `url.path` and `url.query`.
46-
examples: ['/search?q=OpenTelemetry#SemConv']
47-
- id: http.request_content_length
48-
type: int
49-
brief: 'Deprecated, use `http.request.header.content-length` instead.'
50-
stability: development
51-
deprecated:
52-
reason: uncategorized
53-
note: Replaced by `http.request.header.content-length`.
54-
examples: 3495
55-
- id: http.response_content_length
56-
type: int
57-
brief: 'Deprecated, use `http.response.header.content-length` instead.'
58-
stability: development
59-
deprecated:
60-
reason: uncategorized
61-
note: Replaced by `http.response.header.content-length`.
62-
examples: 3495
63-
- id: http.client_ip
64-
type: string
65-
stability: development
66-
deprecated:
67-
reason: renamed
68-
renamed_to: client.address
69-
brief: "Deprecated, use `client.address` instead."
70-
examples: '83.164.160.102'
71-
- id: http.host
72-
type: string
73-
stability: development
74-
deprecated:
75-
reason: uncategorized
76-
note: >
77-
Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.
78-
brief: "Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage."
79-
examples: ['www.example.org']
80-
- id: http.request_content_length_uncompressed
81-
stability: development
82-
deprecated:
83-
reason: renamed
84-
renamed_to: http.request.body.size
85-
type: int
86-
brief: "Deprecated, use `http.request.body.size` instead."
87-
examples: 5493
88-
- id: http.response_content_length_uncompressed
89-
stability: development
90-
deprecated:
91-
reason: renamed
92-
renamed_to: http.response.body.size
93-
type: int
94-
brief: "Deprecated, use `http.response.body.size` instead."
95-
examples: 5493
96-
- id: http.server_name
97-
type: string
98-
stability: development
99-
deprecated:
100-
reason: renamed
101-
renamed_to: server.address
102-
brief: "Deprecated, use `server.address` instead."
103-
examples: ['example.com']
104-
- id: http.flavor
105-
type:
106-
members:
107-
- id: http_1_0
108-
value: '1.0'
109-
brief: 'HTTP/1.0'
110-
stability: development
111-
- id: http_1_1
112-
value: '1.1'
113-
brief: 'HTTP/1.1'
114-
stability: development
115-
- id: http_2_0
116-
value: '2.0'
117-
brief: 'HTTP/2'
118-
stability: development
119-
- id: http_3_0
120-
value: '3.0'
121-
brief: 'HTTP/3'
122-
stability: development
123-
- id: spdy
124-
value: 'SPDY'
125-
brief: 'SPDY protocol.'
126-
stability: development
127-
- id: quic
128-
value: 'QUIC'
129-
brief: 'QUIC protocol.'
130-
stability: development
131-
brief: 'Deprecated, use `network.protocol.name` and `network.protocol.version` instead.'
132-
deprecated:
133-
reason: uncategorized
134-
note: "Split into `network.protocol.name` and `network.protocol.version`"
135-
stability: development
136-
- id: http.user_agent
137-
type: string
138-
brief: 'Deprecated, use `user_agent.original` instead.'
139-
examples: ['CERN-LineMode/2.15 libwww/2.17b3',
140-
'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']
141-
deprecated:
142-
reason: renamed
143-
renamed_to: user_agent.original
144-
stability: development
1+
file_format: definition/2
2+
3+
attributes:
4+
- key: http.method
5+
type: string
6+
brief: 'Deprecated, use `http.request.method` instead.'
7+
stability: development
8+
deprecated:
9+
reason: renamed
10+
renamed_to: http.request.method
11+
note: "Replaced by http.request.method."
12+
examples: ["GET", "POST", "HEAD"]
13+
- key: http.status_code
14+
type: int
15+
brief: 'Deprecated, use `http.response.status_code` instead.'
16+
stability: development
17+
deprecated:
18+
reason: renamed
19+
renamed_to: http.response.status_code
20+
note: "Replaced by http.response.status_code."
21+
examples: [200]
22+
- key: http.scheme
23+
type: string
24+
brief: 'Deprecated, use `url.scheme` instead.'
25+
stability: development
26+
deprecated:
27+
reason: renamed
28+
renamed_to: url.scheme
29+
note: "Replaced by url.scheme."
30+
examples: ['http', 'https']
31+
- key: http.url
32+
type: string
33+
brief: 'Deprecated, use `url.full` instead.'
34+
stability: development
35+
deprecated:
36+
reason: renamed
37+
renamed_to: url.full
38+
note: "Replaced by url.full."
39+
examples: ['https://www.foo.bar/search?q=OpenTelemetry#SemConv']
40+
- key: http.target
41+
type: string
42+
brief: 'Deprecated, use `url.path` and `url.query` instead.'
43+
stability: development
44+
deprecated:
45+
reason: obsoleted
46+
note: Split to `url.path` and `url.query`.
47+
examples: ['/search?q=OpenTelemetry#SemConv']
48+
- key: http.request_content_length
49+
type: int
50+
brief: 'Deprecated, use `http.request.header.content-length` instead.'
51+
stability: development
52+
deprecated:
53+
reason: uncategorized
54+
note: Replaced by `http.request.header.content-length`.
55+
examples: 3495
56+
- key: http.response_content_length
57+
type: int
58+
brief: 'Deprecated, use `http.response.header.content-length` instead.'
59+
stability: development
60+
deprecated:
61+
reason: uncategorized
62+
note: Replaced by `http.response.header.content-length`.
63+
examples: 3495
64+
- key: http.client_ip
65+
type: string
66+
stability: development
67+
deprecated:
68+
reason: renamed
69+
renamed_to: client.address
70+
note: "Replaced by client.address."
71+
brief: "Deprecated, use `client.address` instead."
72+
examples: '83.164.160.102'
73+
- key: http.host
74+
type: string
75+
stability: development
76+
deprecated:
77+
reason: uncategorized
78+
note: >
79+
Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.
80+
brief: "Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage."
81+
examples: ['www.example.org']
82+
- key: http.request_content_length_uncompressed
83+
stability: development
84+
deprecated:
85+
reason: renamed
86+
renamed_to: http.request.body.size
87+
note: "Replaced by http.request.body.size."
88+
type: int
89+
brief: "Deprecated, use `http.request.body.size` instead."
90+
examples: 5493
91+
- key: http.response_content_length_uncompressed
92+
stability: development
93+
deprecated:
94+
reason: renamed
95+
renamed_to: http.response.body.size
96+
note: "Replaced by http.response.body.size."
97+
type: int
98+
brief: "Deprecated, use `http.response.body.size` instead."
99+
examples: 5493
100+
- key: http.server_name
101+
type: string
102+
stability: development
103+
deprecated:
104+
reason: renamed
105+
renamed_to: server.address
106+
note: "Replaced by server.address."
107+
brief: "Deprecated, use `server.address` instead."
108+
examples: ['example.com']
109+
- key: http.flavor
110+
type:
111+
members:
112+
- id: http_1_0
113+
value: '1.0'
114+
brief: 'HTTP/1.0'
115+
stability: development
116+
- id: http_1_1
117+
value: '1.1'
118+
brief: 'HTTP/1.1'
119+
stability: development
120+
- id: http_2_0
121+
value: '2.0'
122+
brief: 'HTTP/2'
123+
stability: development
124+
- id: http_3_0
125+
value: '3.0'
126+
brief: 'HTTP/3'
127+
stability: development
128+
- id: spdy
129+
value: 'SPDY'
130+
brief: 'SPDY protocol.'
131+
stability: development
132+
- id: quic
133+
value: 'QUIC'
134+
brief: 'QUIC protocol.'
135+
stability: development
136+
brief: 'Deprecated, use `network.protocol.name` and `network.protocol.version` instead.'
137+
deprecated:
138+
reason: uncategorized
139+
note: "Split into `network.protocol.name` and `network.protocol.version`"
140+
stability: development
141+
- key: http.user_agent
142+
type: string
143+
brief: 'Deprecated, use `user_agent.original` instead.'
144+
examples: ['CERN-LineMode/2.15 libwww/2.17b3',
145+
'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']
146+
deprecated:
147+
reason: renamed
148+
renamed_to: user_agent.original
149+
note: "Replaced by user_agent.original."
150+
stability: development

model/http/events.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
groups:
2-
- id: event.http.client.request.exception
3-
name: http.client.request.exception
1+
file_format: definition/2
2+
3+
events:
4+
- name: http.client.request.exception
45
stability: development
5-
type: event
6+
requirement_level: recommended
67
brief: >
78
This event represents an exception that occurred during an HTTP client request,
89
such as network failures, timeouts, or other errors that prevent the request
@@ -27,10 +28,9 @@ groups:
2728
conditionally_required: Required if `exception.type` is not set, recommended otherwise.
2829
- ref: exception.stacktrace
2930

30-
- id: event.http.server.request.exception
31-
name: http.server.request.exception
31+
- name: http.server.request.exception
3232
stability: development
33-
type: event
33+
requirement_level: recommended
3434
brief: >
3535
This event represents an exception that occurred during HTTP server request processing,
3636
such as application errors, internal failures, or other exceptions that prevent

0 commit comments

Comments
 (0)