From fa2d7f993fcc1b7bdc29f9ea453c806a9863e260 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 3 Aug 2023 10:26:43 -0700 Subject: [PATCH] Rename `http.*.duration` to `http.*.request.duration` (#224) --- CHANGELOG.md | 5 ++++- docs/general/metrics.md | 2 +- docs/http/http-metrics.md | 20 ++++++++++---------- model/metrics/http.yaml | 8 ++++---- schema-next.yaml | 6 ++++++ 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ec2227460..9b633c9659 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,10 @@ release. ([#95](https://github.com/open-telemetry/semantic-conventions/pull/95)) - Update `.count` metric naming convention so that it only applies to UpDownCounters, and add that `.total` should not be used by either Counters or UpDownCounters - ([#107](https://github.com/open-telemetry/opentelemetry-specification/pull/107)) + ([#107](https://github.com/open-telemetry/semantic-conventions/pull/107)) +- BREAKING: Rename `http.client.duration` and `http.server.duration` metrics to + `http.client.request.duration` and `http.server.request.duration` respectively. + ([#224](https://github.com/open-telemetry/semantic-conventions/pull/224)) ## v1.21.0 (2023-07-13) diff --git a/docs/general/metrics.md b/docs/general/metrics.md index 3ba128a273..938a5e73e1 100644 --- a/docs/general/metrics.md +++ b/docs/general/metrics.md @@ -113,7 +113,7 @@ question is a non-unit (like `{fault}` or `{operation}`). Examples: -* `system.filesystem.utilization`, `http.server.duration`, and `system.cpu.time` +* `system.filesystem.utilization`, `http.server.request.duration`, and `system.cpu.time` should not be pluralized, even if many data points are recorded. * `system.paging.faults`, `system.disk.operations`, and `system.network.packets` should be pluralized, even if only a single data point is recorded. diff --git a/docs/http/http-metrics.md b/docs/http/http-metrics.md index 502d9e0a14..fe9c4da823 100644 --- a/docs/http/http-metrics.md +++ b/docs/http/http-metrics.md @@ -15,12 +15,12 @@ operations. By adding HTTP attributes to metric events it allows for finely tune - [HTTP Server](#http-server) - * [Metric: `http.server.duration`](#metric-httpserverduration) + * [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) - [HTTP Client](#http-client) - * [Metric: `http.client.duration`](#metric-httpclientduration) + * [Metric: `http.client.request.duration`](#metric-httpclientrequestduration) * [Metric: `http.client.request.size`](#metric-httpclientrequestsize) * [Metric: `http.client.response.size`](#metric-httpclientresponsesize) @@ -53,7 +53,7 @@ operations. By adding HTTP attributes to metric events it allows for finely tune ## HTTP Server -### Metric: `http.server.duration` +### Metric: `http.server.request.duration` **Status**: [Experimental, Feature-freeze][DocumentStatus] @@ -65,13 +65,13 @@ This metric SHOULD be specified with [`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/metrics/api.md#instrument-advice) of `[ 0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]`. - + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `http.server.duration` | Histogram | `s` | Measures the duration of inbound HTTP requests. | +| `http.server.request.duration` | Histogram | `s` | Measures the duration of inbound HTTP requests. | - + | 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 | @@ -364,7 +364,7 @@ SHOULD NOT be set if only IP address is available and capturing name would requi ## HTTP Client -### Metric: `http.client.duration` +### Metric: `http.client.request.duration` **Status**: [Experimental, Feature-freeze][DocumentStatus] @@ -376,13 +376,13 @@ This metric SHOULD be specified with [`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/metrics/api.md#instrument-advice) of `[ 0, 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ]`. - + | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `http.client.duration` | Histogram | `s` | Measures the duration of outbound HTTP requests. | +| `http.client.request.duration` | Histogram | `s` | Measures the duration of outbound HTTP requests. | - + | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `http.request.method` | string | HTTP request method. [1] | `GET`; `POST`; `HEAD` | Required | diff --git a/model/metrics/http.yaml b/model/metrics/http.yaml index 385242ddbb..813179a005 100644 --- a/model/metrics/http.yaml +++ b/model/metrics/http.yaml @@ -48,9 +48,9 @@ groups: - ref: network.protocol.version - ref: server.socket.address - - id: metric.http.server.duration + - id: metric.http.server.request.duration type: metric - metric_name: http.server.duration + metric_name: http.server.request.duration brief: "Measures the duration of inbound HTTP requests." instrument: histogram unit: "s" @@ -110,9 +110,9 @@ groups: unit: "By" extends: metric_attributes.http.server - - id: metric.http.client.duration + - id: metric.http.client.request.duration type: metric - metric_name: http.client.duration + metric_name: http.client.request.duration brief: "Measures the duration of outbound HTTP requests." instrument: histogram unit: "s" diff --git a/schema-next.yaml b/schema-next.yaml index 37d35efc84..14e82faac1 100644 --- a/schema-next.yaml +++ b/schema-next.yaml @@ -2,6 +2,12 @@ file_format: 1.1.0 schema_url: https://opentelemetry.io/schemas/1.21.0 versions: next: + metrics: + changes: + # https://github.com/open-telemetry/semantic-conventions/pull/224 + - rename_metrics: + http.client.duration: http.client.request.duration + http.server.duration: http.server.request.duration 1.21.0: spans: changes: