diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6974e789..a85b404ca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,9 @@ release. - BREAKING: Rename `messaging.message.payload_size_bytes` to `messaging.message.body.size`, remove `messaging.message.payload_compressed_size_bytes`. ([#229](https://github.com/open-telemetry/semantic-conventions/pull/229)) +- BREAKING: Rename `http.server.request.size` metric to `http.server.request.body.size` + and `http.server.response.size` metric to `http.server.response.body.size` + ([#247](https://github.com/open-telemetry/semantic-conventions/pull/247)) ## v1.21.0 (2023-07-13) diff --git a/docs/http/http-metrics.md b/docs/http/http-metrics.md index c41cf7c61a..8cc48b775d 100644 --- a/docs/http/http-metrics.md +++ b/docs/http/http-metrics.md @@ -17,12 +17,12 @@ operations. By adding HTTP attributes to metric events it allows for finely tune - [HTTP Server](#http-server) * [Metric: `http.server.request.duration`](#metric-httpserverrequestduration) * [Metric: `http.server.active_requests`](#metric-httpserveractive_requests) - * [Metric: `http.server.request.size`](#metric-httpserverrequestsize) - * [Metric: `http.server.response.size`](#metric-httpserverresponsesize) + * [Metric: `http.server.request.body.size`](#metric-httpserverrequestbodysize) + * [Metric: `http.server.response.body.size`](#metric-httpserverresponsebodysize) - [HTTP Client](#http-client) * [Metric: `http.client.request.duration`](#metric-httpclientrequestduration) - * [Metric: `http.client.request.size`](#metric-httpclientrequestsize) - * [Metric: `http.client.response.size`](#metric-httpclientresponsesize) + * [Metric: `http.client.request.body.size`](#metric-httpclientrequestbodysize) + * [Metric: `http.client.response.body.size`](#metric-httpclientresponsebodysize) @@ -229,21 +229,21 @@ SHOULD NOT be set if only IP address is available and capturing name would requi | `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. | -### Metric: `http.server.request.size` +### Metric: `http.server.request.body.size` **Status**: [Experimental][DocumentStatus] This metric is optional. - + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `http.server.request.size` | Histogram | `By` | Measures the size of HTTP request messages. [1] | +| `http.server.request.body.size` | Histogram | `By` | Measures the size of HTTP request messages. [1] | -**[1]:** Size as measured over the wire (compressed size if messages are compressed). +**[1]:** 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. - + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `http.route` | string | The matched route (path template in the format used by the respective server framework). See note below [1] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available | @@ -331,21 +331,21 @@ SHOULD NOT be set if only IP address is available and capturing name would requi | `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. | -### Metric: `http.server.response.size` +### Metric: `http.server.response.body.size` **Status**: [Experimental][DocumentStatus] This metric is optional. - + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `http.server.response.size` | Histogram | `By` | Measures the size of HTTP response messages. [1] | +| `http.server.response.body.size` | Histogram | `By` | Measures the size of HTTP response messages. [1] | -**[1]:** Size as measured over the wire (compressed size if messages are compressed). +**[1]:** 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. - + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `http.route` | string | The matched route (path template in the format used by the respective server framework). See note below [1] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available | @@ -535,21 +535,21 @@ When observed from the server side, this SHOULD represent the physical server ad | `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. | -### Metric: `http.client.request.size` +### Metric: `http.client.request.body.size` **Status**: [Experimental][DocumentStatus] This metric is optional. - + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `http.client.request.size` | Histogram | `By` | Measures the size of HTTP request messages. [1] | +| `http.client.request.body.size` | Histogram | `By` | Measures the size of HTTP request messages. [1] | -**[1]:** Size as measured over the wire (compressed size if messages are compressed). +**[1]:** 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. - + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `name_resolution_error`; `500` | Conditionally Required: If request has ended with an error. | @@ -631,21 +631,21 @@ When observed from the server side, this SHOULD represent the physical server ad | `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. | -### Metric: `http.client.response.size` +### Metric: `http.client.response.body.size` **Status**: [Experimental][DocumentStatus] This metric is optional. - + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `http.client.response.size` | Histogram | `By` | Measures the size of HTTP response messages. [1] | +| `http.client.response.body.size` | Histogram | `By` | Measures the size of HTTP response messages. [1] | -**[1]:** Size as measured over the wire (compressed size if messages are compressed). +**[1]:** 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. - + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `name_resolution_error`; `500` | Conditionally Required: If request has ended with an error. | diff --git a/model/metrics/http.yaml b/model/metrics/http.yaml index c0e241b9c7..53ad230d28 100644 --- a/model/metrics/http.yaml +++ b/model/metrics/http.yaml @@ -134,22 +134,28 @@ groups: if it's sent in absolute-form. - Port identifier of the `Host` header - - id: metric.http.server.request.size + - id: metric.http.server.request.body.size type: metric - metric_name: http.server.request.size + metric_name: http.server.request.body.size brief: "Measures the size of HTTP request messages." instrument: histogram unit: "By" - note: Size as measured over the wire (compressed size if messages are compressed). + 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.size + - id: metric.http.server.response.body.size type: metric - metric_name: http.server.response.size + metric_name: http.server.response.body.size brief: "Measures the size of HTTP response messages." instrument: histogram unit: "By" - note: Size as measured over the wire (compressed size if messages are compressed). + 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 @@ -160,20 +166,26 @@ groups: unit: "s" extends: metric_attributes.http.client - - id: metric.http.client.request.size + - id: metric.http.client.request.body.size type: metric - metric_name: http.client.request.size + metric_name: http.client.request.body.size brief: "Measures the size of HTTP request messages." instrument: histogram unit: "By" - note: Size as measured over the wire (compressed size if messages are compressed). + 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.size + - id: metric.http.client.response.body.size type: metric - metric_name: http.client.response.size + metric_name: http.client.response.body.size brief: "Measures the size of HTTP response messages." instrument: histogram unit: "By" - note: Size as measured over the wire (compressed size if messages are compressed). + 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 diff --git a/schema-next.yaml b/schema-next.yaml index 7e82205757..4fecff3b2e 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -131,6 +131,10 @@ versions: status: system.processes.status apply_to_metrics: - system.processes.count + # https://github.com/open-telemetry/semantic-conventions/pull/247 + - rename_metrics: + http.server.request.size: http.server.request.body.size + http.server.response.size: http.server.response.body.size 1.21.0: spans: changes: