159 lines
7.4 KiB
YAML
159 lines
7.4 KiB
YAML
groups:
|
|
- id: metric_attributes.http.server
|
|
type: attribute_group
|
|
brief: 'HTTP server attributes'
|
|
extends: attributes.http.server
|
|
attributes:
|
|
- ref: server.address
|
|
requirement_level: opt_in
|
|
note: |
|
|
Determined by using the first of the following that applies:
|
|
|
|
- The [primary server name](/docs/http/http-spans.md#http-server-definitions) of the matched virtual host.
|
|
- 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 [Forwarded#host](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded#host),
|
|
[X-Forwarded-Host](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Host), or a similar header.
|
|
- Host identifier of the `Host` header.
|
|
|
|
MUST NOT include the port identifier.
|
|
|
|
Warning: since this attribute may be based on HTTP headers, opting in to it may allow an attacker
|
|
to trigger cardinality limits, degrading the usefulness of the metric.
|
|
|
|
- ref: server.port
|
|
requirement_level: opt_in
|
|
note: |
|
|
Determined by using the first of the following that applies:
|
|
|
|
- Port identifier of the [primary server host](/docs/http/http-spans.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 [Forwarded#host](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded#host),
|
|
[X-Forwarded-Host](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Host), or a similar header.
|
|
- Port identifier of the `Host` header.
|
|
|
|
Warning: since this attribute may be based on HTTP headers, opting in to it may allow an attacker
|
|
to trigger cardinality limits, degrading the usefulness of the metric.
|
|
|
|
- id: metric_attributes.http.client
|
|
type: attribute_group
|
|
brief: 'HTTP client attributes'
|
|
extends: attributes.http.client
|
|
attributes:
|
|
- ref: url.scheme
|
|
requirement_level: required
|
|
examples: ["http", "https"]
|
|
|
|
- id: metric.http.server.request.duration
|
|
type: metric
|
|
metric_name: http.server.request.duration
|
|
brief: "Duration of HTTP server requests."
|
|
instrument: histogram
|
|
unit: "s"
|
|
extends: metric_attributes.http.server
|
|
|
|
- id: metric.http.server.active_requests
|
|
type: metric
|
|
metric_name: http.server.active_requests
|
|
brief: "Number of active HTTP server requests."
|
|
instrument: updowncounter
|
|
unit: "{request}"
|
|
attributes:
|
|
- ref: http.request.method
|
|
requirement_level: required
|
|
- ref: url.scheme
|
|
requirement_level: required
|
|
examples: ["http", "https"]
|
|
- ref: server.address
|
|
requirement_level: opt_in
|
|
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](/docs/http/http-spans.md#http-server-definitions) of the matched virtual host.
|
|
- 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 [Forwarded#host](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded#host),
|
|
[X-Forwarded-Host](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Host), or a similar header.
|
|
- Host identifier of the `Host` header.
|
|
|
|
MUST NOT include the port identifier.
|
|
|
|
Warning: since this attribute may be based on HTTP headers, opting in to it may allow an attacker
|
|
to trigger cardinality limits, degrading the usefulness of the metric.
|
|
|
|
- ref: server.port
|
|
requirement_level: opt_in
|
|
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](/docs/http/http-spans.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 [Forwarded#host](https://developer.mozilla.org/docs/Web/HTTP/Headers/Forwarded#host),
|
|
[X-Forwarded-Host](https://developer.mozilla.org/docs/Web/HTTP/Headers/X-Forwarded-Host), or a similar header.
|
|
- Port identifier of the `Host` header.
|
|
|
|
Warning: since this attribute may be based on HTTP headers, opting in to it may allow an attacker
|
|
to trigger cardinality limits, degrading the usefulness of the metric.
|
|
|
|
- id: metric.http.server.request.body.size
|
|
type: metric
|
|
metric_name: http.server.request.body.size
|
|
brief: "Size of HTTP server request bodies."
|
|
instrument: histogram
|
|
unit: "By"
|
|
note: >
|
|
The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and
|
|
is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
|
|
header. For requests using transport encoding, this should be the compressed size.
|
|
extends: metric_attributes.http.server
|
|
|
|
- id: metric.http.server.response.body.size
|
|
type: metric
|
|
metric_name: http.server.response.body.size
|
|
brief: "Size of HTTP server response bodies."
|
|
instrument: histogram
|
|
unit: "By"
|
|
note: >
|
|
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and
|
|
is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
|
|
header. For requests using transport encoding, this should be the compressed size.
|
|
extends: metric_attributes.http.server
|
|
|
|
- id: metric.http.client.request.duration
|
|
type: metric
|
|
metric_name: http.client.request.duration
|
|
brief: "Duration of HTTP client requests."
|
|
instrument: histogram
|
|
unit: "s"
|
|
extends: metric_attributes.http.client
|
|
|
|
- id: metric.http.client.request.body.size
|
|
type: metric
|
|
metric_name: http.client.request.body.size
|
|
brief: "Size of HTTP client request bodies."
|
|
instrument: histogram
|
|
unit: "By"
|
|
note: >
|
|
The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and
|
|
is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
|
|
header. For requests using transport encoding, this should be the compressed size.
|
|
extends: metric_attributes.http.client
|
|
|
|
- id: metric.http.client.response.body.size
|
|
type: metric
|
|
metric_name: http.client.response.body.size
|
|
brief: "Size of HTTP client response bodies."
|
|
instrument: histogram
|
|
unit: "By"
|
|
note: >
|
|
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and
|
|
is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length)
|
|
header. For requests using transport encoding, this should be the compressed size.
|
|
extends: metric_attributes.http.client
|