diff --git a/docs/http/http-spans.md b/docs/http/http-spans.md index 871dc221b9..962e042189 100644 --- a/docs/http/http-spans.md +++ b/docs/http/http-spans.md @@ -61,13 +61,20 @@ and various HTTP versions like 1.1, 2 and SPDY. ## Name HTTP spans MUST follow the overall [guidelines for span names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/trace/api.md#span). -HTTP server span names SHOULD be `{http.request.method} {http.route}` if there is a + +HTTP server span names SHOULD be `{method} {http.route}` if there is a (low-cardinality) `http.route` available. -HTTP server span names SHOULD be `{http.request.method}` if there is no (low-cardinality) -`http.route` available. + +If there is no (low-cardinality) `http.route` available, HTTP server span names +SHOULD match `{method}` + HTTP client spans have no `http.route` attribute since client-side instrumentation -is not generally aware of the "route", and therefore HTTP client spans SHOULD use -`{http.request.method}`. +is not generally aware of the "route", and therefore HTTP client spans SHOULD be +`{method}`. + +The `{method}` in all cases SHOULD be `{http.request.method_original}` when the original method +is available and `{http.request.method}` otherwise. + Instrumentation MUST NOT default to using URI path as span name, but MAY provide hooks to allow custom logic to override the default span name.