121 lines
5.1 KiB
YAML
121 lines
5.1 KiB
YAML
groups:
|
|
- id: attributes.http.common
|
|
type: attribute_group
|
|
brief: "Describes HTTP attributes."
|
|
prefix: http
|
|
attributes:
|
|
- id: method
|
|
type: string
|
|
requirement_level: required
|
|
brief: 'HTTP request method.'
|
|
examples: ["GET", "POST", "HEAD"]
|
|
- id: status_code
|
|
type: int
|
|
requirement_level:
|
|
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.'
|
|
note: >
|
|
If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor`
|
|
is `QUIC`, in which case `IP.UDP` is assumed.
|
|
|
|
- id: attributes.http.client
|
|
prefix: http
|
|
type: attribute_group
|
|
brief: 'HTTP Client spans attributes'
|
|
attributes:
|
|
- ref: net.peer.name
|
|
requirement_level: required
|
|
brief: >
|
|
Host identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to.
|
|
note: |
|
|
Determined by using the first of the following that applies
|
|
|
|
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
|
|
if it's sent in absolute-form
|
|
- Host identifier of the `Host` header
|
|
|
|
SHOULD NOT be set if capturing it would require an extra DNS lookup.
|
|
- ref: net.peer.port
|
|
requirement_level:
|
|
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
|
|
brief: >
|
|
Port identifier of the ["URI origin"](https://www.rfc-editor.org/rfc/rfc9110.html#name-uri-origin) HTTP request is sent to.
|
|
note: >
|
|
When [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource) is absolute URI, `net.peer.name` MUST match
|
|
URI port identifier, otherwise it MUST match `Host` header port identifier.
|
|
|
|
- id: attributes.http.server
|
|
prefix: http
|
|
type: attribute_group
|
|
brief: 'HTTP Server spans attributes'
|
|
attributes:
|
|
- id: scheme
|
|
type: string
|
|
brief: 'The URI scheme identifying the used protocol.'
|
|
requirement_level: required
|
|
examples: ["http", "https"]
|
|
- id: route
|
|
type: string
|
|
requirement_level:
|
|
conditionally_required: If and only if it's available
|
|
brief: >
|
|
The matched route (path template in the format used by the respective server framework). See note below
|
|
examples: ['/users/:userID?', '{controller}/{action}/{id?}']
|
|
note: >
|
|
MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
|
|
|
|
SHOULD include the [application root](/specification/trace/semantic_conventions/http.md#http-server-definitions) if there is one.
|
|
- ref: net.host.name
|
|
requirement_level: required
|
|
brief: >
|
|
Name of the local HTTP server that received the request.
|
|
note: |
|
|
Determined by using the first of the following that applies
|
|
|
|
- The [primary server name](/specification/trace/semantic_conventions/http.md#http-server-definitions) of the matched virtual host. MUST only
|
|
include host identifier.
|
|
- Host identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
|
|
if it's sent in absolute-form.
|
|
- Host identifier of the `Host` header
|
|
|
|
SHOULD NOT be set if only IP address is available and capturing name would require a reverse DNS lookup.
|
|
|
|
- ref: net.host.port
|
|
requirement_level:
|
|
conditionally_required: If not default (`80` for `http` scheme, `443` for `https`).
|
|
brief: >
|
|
Port of the local HTTP server that received the request.
|
|
note: |
|
|
Determined by using the first of the following that applies
|
|
|
|
- Port identifier of the [primary server host](/specification/trace/semantic_conventions/http.md#http-server-definitions) of the matched virtual host.
|
|
- Port identifier of the [request target](https://www.rfc-editor.org/rfc/rfc9110.html#target.resource)
|
|
if it's sent in absolute-form.
|
|
- Port identifier of the `Host` header
|