diff --git a/CHANGELOG.md b/CHANGELOG.md index b80e5863765..cd8ab7f83bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,6 +43,9 @@ release. ([#2617](https://github.com/open-telemetry/opentelemetry-specification/pull/2617)) - Add `rpc.grpc.status_code` to RPC metric semantic conventions ([#2604](https://github.com/open-telemetry/opentelemetry-specification/pull/2604)). +- Add `http.*.*.size` metric semantic conventions for tracking size of requests + / responses for http servers / clients + ([#2588](https://github.com/open-telemetry/opentelemetry-specification/pull/2588)). ### Compatibility diff --git a/specification/metrics/semantic_conventions/http-metrics.md b/specification/metrics/semantic_conventions/http-metrics.md index 1969274bf86..9919e3451b7 100644 --- a/specification/metrics/semantic_conventions/http-metrics.md +++ b/specification/metrics/semantic_conventions/http-metrics.md @@ -23,20 +23,24 @@ Below is a table of HTTP server metric instruments. | Name | Instrument Type ([*](README.md#instrument-types)) | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | |-------------------------------|---------------------------------------------------|--------------|-------------------------------------------|------------------------------------------------------------------------------| -| `http.server.duration` | Histogram | milliseconds | `ms` | measures the duration of the inbound HTTP request | +| `http.server.duration` | Histogram | milliseconds | `ms` | measures the duration inbound HTTP requests | +| `http.server.request.size` | Histogram | bytes | `By` | measures the size of HTTP request messages (compressed) | +| `http.server.response.size` | Histogram | bytes | `By` | measures the size of HTTP response messages (compressed) | | `http.server.active_requests` | UpDownCounter | requests | `{requests}` | measures the number of concurrent HTTP requests that are currently in-flight | ### HTTP Client Below is a table of HTTP client metric instruments. -| Name | Instrument Type ([*](README.md#instrument-types)) | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | -|------------------------|---------------------------------------------------|--------------|-------------------------------------------|----------------------------------------------------| -| `http.client.duration` | Histogram | milliseconds | `ms` | measures the duration of the outbound HTTP request | +| Name | Instrument Type ([*](README.md#instrument-types)) | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | +|-----------------------------|---------------------------------------------------|--------------|-------------------------------------------|----------------------------------------------------------| +| `http.client.duration` | Histogram | milliseconds | `ms` | measures the duration outbound HTTP requests | +| `http.client.request.size` | Histogram | bytes | `By` | measures the size of HTTP request messages (compressed) | +| `http.client.response.size` | Histogram | bytes | `By` | measures the size of HTTP response messages (compressed) | ## Attributes -Below is a table of the attributes that SHOULD be included on `duration` metric events +Below is a table of the attributes that SHOULD be included on `duration` and `size` metric events and whether they should be on server, client, or both types of HTTP metric events: | Name | Type | Requirement Level | Notes and examples |