From 68515b75f120709d560ad4a8075f03d7f1762caf Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 31 May 2023 18:27:03 -0700 Subject: [PATCH] HTTP duration metrics should match HTTP span duration --- CHANGELOG.md | 2 ++ specification/metrics/semantic_conventions/http-metrics.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 298f090d34..edb0466da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,3 +68,5 @@ release. ([#13](https://github.com/open-telemetry/semantic-conventions/pull/13)) - Clarify `process.runtime.jvm.threads.count` refers to platform threads. ([#54](https://github.com/open-telemetry/semantic-conventions/pull/54)) +- Add note that HTTP duration metrics should match HTTP span duration. + ([#99](https://github.com/open-telemetry/semantic-conventions/pull/99)) diff --git a/specification/metrics/semantic_conventions/http-metrics.md b/specification/metrics/semantic_conventions/http-metrics.md index a17c38b391..41239f296c 100644 --- a/specification/metrics/semantic_conventions/http-metrics.md +++ b/specification/metrics/semantic_conventions/http-metrics.md @@ -56,6 +56,8 @@ operations. By adding HTTP attributes to metric events it allows for finely tune This metric is required. +When this metric is reported alongside an HTTP server span, the metric value SHOULD be the same as the HTTP server span duration. + This metric SHOULD be specified with [`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.21.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 ]`. @@ -241,6 +243,8 @@ SHOULD NOT be set if only IP address is available and capturing name would requi This metric is required. +When this metric is reported alongside an HTTP client span, the metric value SHOULD be the same as the HTTP client span duration. + This metric SHOULD be specified with [`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.21.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 ]`.