Skip to content

Commit 84f4b2b

Browse files
Migrate HTTP conventions to Schema v2 (definition/2)
1 parent b51e2a6 commit 84f4b2b

6 files changed

Lines changed: 580 additions & 491 deletions

File tree

model/http/common.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
groups:
1+
file_format: definition/2
2+
3+
attribute_groups:
24
- id: attributes.http.common
3-
type: attribute_group
5+
visibility: public
6+
stability: development
47
brief: "Describes HTTP attributes."
58
attributes:
69
- ref: http.request.method
@@ -37,10 +40,11 @@ groups:
3740
examples: ['1.0', '1.1', '2', '3']
3841

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

model/http/events.yaml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
groups:
2-
- id: event.http.client.request.exception
3-
name: http.client.request.exception
1+
file_format: definition/2
2+
events:
3+
- name: http.client.request.exception
44
stability: development
5-
type: event
65
brief: >
76
This event represents an exception that occurred during an HTTP client request,
87
such as network failures, timeouts, or other errors that prevent the request
98
from completing successfully.
109
note: >
1110
This event SHOULD be recorded when an exception occurs during HTTP client operations.
12-
1311
Instrumentations SHOULD set the severity to WARN (severity number 13) when recording this event.
14-
1512
Some HTTP client frameworks generate artificial exceptions for non-successful HTTP status codes
1613
(e.g., 404 Not Found). When possible, instrumentations SHOULD NOT record these artificial
1714
exceptions, or SHOULD set the severity to DEBUG (severity number 5).
18-
1915
Instrumentations MAY provide a configuration option to populate exception events
2016
with the attributes captured on the corresponding HTTP client span.
2117
attributes:
@@ -26,20 +22,15 @@ groups:
2622
requirement_level:
2723
conditionally_required: Required if `exception.type` is not set, recommended otherwise.
2824
- ref: exception.stacktrace
29-
30-
- id: event.http.server.request.exception
31-
name: http.server.request.exception
25+
- name: http.server.request.exception
3226
stability: development
33-
type: event
3427
brief: >
3528
This event represents an exception that occurred during HTTP server request processing,
3629
such as application errors, internal failures, or other exceptions that prevent
3730
the server from successfully handling the request.
3831
note: >
3932
This event SHOULD be recorded when an exception occurs during HTTP server request processing.
40-
4133
Instrumentations SHOULD set the severity to ERROR (severity number 17) when recording this event.
42-
4334
Instrumentations MAY provide a configuration option to populate exception events
4435
with the attributes captured on the corresponding HTTP server span.
4536
attributes:

0 commit comments

Comments
 (0)