Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fecc7ea
Added http route attribute to HTTP client attributes
klauco Jan 30, 2024
ac532b6
make table-generation
trask Jan 31, 2024
f3584ff
fixed comments
klauco Feb 1, 2024
148b46e
Updated brief
klauco Feb 7, 2024
0dd5aab
run table generation
klauco Feb 7, 2024
02ee3c2
changelog entry
klauco Feb 9, 2024
4c184a8
maybe -> may be
klauco Mar 7, 2024
d5c3a53
absolute path reference used, http spans with opt-in http.route
klauco Apr 7, 2024
8cbb7d2
using url.template on client spans and metrics
klauco Apr 30, 2024
384a230
updated brief
klauco Apr 30, 2024
d7f5183
Apply suggestions from code review
klauco May 1, 2024
4586315
marking semantic conventions for spans as stable unless otherwise spe…
klauco May 1, 2024
21c3d9d
toc updated
klauco May 1, 2024
14f1612
rebase and suggest span name
May 2, 2024
13cf2ea
clean up
May 2, 2024
7ec0443
change metrics to emphasize experimental status of url.template
May 2, 2024
17e7366
lint fix
klauco May 3, 2024
36913ad
Merge branch 'main' into allow-http-route-on-client
klauco May 3, 2024
2e18b03
Core review
May 6, 2024
03a5e66
span kind specification
klauco May 6, 2024
ed69c63
Merge branch 'main' into allow-http-route-on-client
klauco May 6, 2024
e76a144
Update docs/http/http-spans.md
May 7, 2024
549e633
Merge branch 'main' into allow-http-route-on-client
klauco May 7, 2024
b040abe
Merge branch 'main' into allow-http-route-on-client
klauco May 7, 2024
4f9deb9
Merge branch 'main' into allow-http-route-on-client
klauco May 7, 2024
540237d
Merge branch 'main' into allow-http-route-on-client
May 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
marking semantic conventions for spans as stable unless otherwise spe…
…cified
  • Loading branch information
klauco authored and Liudmila Molkova committed May 2, 2024
commit 458631559582430ab7a87ac7fad6b405a9945826
6 changes: 3 additions & 3 deletions docs/http/http-metrics.md
Comment thread
klauco marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ of `[ 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
| `network.protocol.name` | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [5] | `http`; `spdy` | `Conditionally Required` [6] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `network.protocol.version` | string | The actual version of the protocol used for network communication. [7] | `1.0`; `1.1`; `2`; `3` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.scheme` | string | The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. | `http`; `https` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [8] | `/users/{id}`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [8] | `/users/{id}`; `/users/:id`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** HTTP request method value SHOULD be "known" to the instrumentation.
By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
Expand Down Expand Up @@ -540,7 +540,7 @@ This metric is optional.
| `network.protocol.name` | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [5] | `http`; `spdy` | `Conditionally Required` [6] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `network.protocol.version` | string | The actual version of the protocol used for network communication. [7] | `1.0`; `1.1`; `2`; `3` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.scheme` | string | The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. | `http`; `https` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [8] | `/users/{id}`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [8] | `/users/{id}`; `/users/:id`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** HTTP request method value SHOULD be "known" to the instrumentation.
By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
Expand Down Expand Up @@ -631,7 +631,7 @@ This metric is optional.
| `network.protocol.name` | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [5] | `http`; `spdy` | `Conditionally Required` [6] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `network.protocol.version` | string | The actual version of the protocol used for network communication. [7] | `1.0`; `1.1`; `2`; `3` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.scheme` | string | The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. | `http`; `https` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [8] | `/users/{id}`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [8] | `/users/{id}`; `/users/:id`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** HTTP request method value SHOULD be "known" to the instrumentation.
By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
Expand Down
17 changes: 14 additions & 3 deletions docs/http/http-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ linkTitle: Spans

# Semantic Conventions for HTTP Spans

<<<<<<< HEAD
**Status**: [Stable][DocumentStatus], Unless otherwise specified.
=======
**Status**: [Stable][DocumentStatus], Unless otherwise specified
>>>>>>> ea8003c (marking semantic conventions for spans as stable unless otherwise specified)

This document defines semantic conventions for HTTP client and server Spans.
They can be used for http and https schemes
Expand Down Expand Up @@ -70,19 +74,26 @@ HTTP spans MUST follow the overall [guidelines for span names](https://github.co

<!-- markdown-link-check-disable -->
<!-- HTML anchors are not supported https://github.com/tcort/markdown-link-check/issues/225-->

### HTTP server span names

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 span names

HTTP client span names SHOULD be `{method} {url.template}` if there is a
(low-cardinality) `url.template` available (see below for the exact definition of the [`{method}`](#method-placeholder) placeholder).
(low-cardinality, experimental) `url.template` available (see below for the exact definition of the [`{method}`](#method-placeholder) placeholder).

If there is no (low-cardinality) `url.template` available, HTTP client span names
If there is no (low-cardinality, experimental) `url.template` available, HTTP client span names
SHOULD be [`{method}`](#method-placeholder).
<!-- markdown-link-check-enable -->

### Notes

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`.

Expand Down Expand Up @@ -144,7 +155,7 @@ For an HTTP client span, `SpanKind` MUST be `Client`.
| `http.response.header.<key>` | string[] | HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values. [12] | `http.response.header.content-type=["application/json"]`; `http.response.header.my-custom-header=["abc", "def"]` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `network.transport` | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [13] | `tcp`; `udp` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.scheme` | string | The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. | `http`; `https` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [14] | `/users/{id}`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `url.template` | string | The low-cardinality template of an [absolute path reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2) associated with outgoing HTTP request. [14] | `/users/{id}`; `/users/:id`; `/users?id={id}` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `user_agent.original` | string | Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client. | `CERN-LineMode/2.15 libwww/2.17b3`; `Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1`; `YourApp/1.0.0 grpc-java-okhttp/1.27.2` | `Opt-In` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** HTTP request method value SHOULD be "known" to the instrumentation.
Expand Down