Use `HTTP` instead of `_OTHER` in HTTP span names (if method is unknown) (#270)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> Co-authored-by: Joao Grassi <joao@joaograssi.com> Co-authored-by: Christian Neumüller <christian+github@neumueller.me> Co-authored-by: Armin Ruech <armin.ruech@dynatrace.com>
This commit is contained in:
parent
3e16365a27
commit
5f6558d259
|
|
@ -65,6 +65,8 @@ release.
|
|||
([#276](https://github.com/open-telemetry/semantic-conventions/pull/276))
|
||||
- Add host cpu resource attributes.
|
||||
([#209](https://github.com/open-telemetry/semantic-conventions/pull/209))
|
||||
- BREAKING: Change HTTP span name when method is unknown (use `HTTP` instead of `_OTHER`)
|
||||
([#270](https://github.com/open-telemetry/semantic-conventions/pull/270))
|
||||
- Moved RPC streaming notes from metric brief section to notes section.
|
||||
([#275](https://github.com/open-telemetry/semantic-conventions/pull/275))
|
||||
|
||||
|
|
|
|||
|
|
@ -62,13 +62,23 @@ 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
|
||||
(low-cardinality) `http.route` available.
|
||||
HTTP server span names SHOULD be `{http.request.method}` if there is no (low-cardinality)
|
||||
`http.route` available.
|
||||
|
||||
<!-- markdown-link-check-disable -->
|
||||
<!-- HTML anchors are not supported https://github.com/tcort/markdown-link-check/issues/225-->
|
||||
HTTP server span names SHOULD be `{method} {http.route}` if there is a
|
||||
(low-cardinality) `http.route` available (see below for the exact definition of the [`{method}`](#method-placeholder) placeholder).
|
||||
|
||||
If there is no (low-cardinality) `http.route` available, HTTP server span names
|
||||
SHOULD be [`{method}`](#method-placeholder).
|
||||
|
||||
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}`](#method-placeholder).
|
||||
<!-- markdown-link-check-enable -->
|
||||
|
||||
The <span id="method-placeholder">`{method}`</span> MUST be `{http.request.method}` if the method represents the original method known to the instrumentation.
|
||||
In other cases (when `{http.request.method}` is set to `_OTHER`), `{method}` MUST be `HTTP`.
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"devDependencies": {
|
||||
"gulp": "^4.0.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"markdown-link-check": "3.10.3",
|
||||
"markdown-link-check": "^3.11.2",
|
||||
"markdown-toc": "^1.2.0",
|
||||
"markdownlint": "^0.29.0",
|
||||
"markdownlint-cli": "0.31.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue