Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define span structure for HTTP retries and redirects #2078

Merged
merged 23 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b1e3531
Draft conventions for retries and redirects
denisivan0v Oct 26, 2021
ef29b45
Added more info for retry and redirect spans
denisivan0v Oct 26, 2021
7c60c1c
Types fixes
denisivan0v Oct 28, 2021
5911b39
Update CHANGELOG.md
denisivan0v Oct 28, 2021
ac65882
Merge branch 'main' into retries-and-redirects
denisivan0v Nov 16, 2021
b098514
Merge branch 'main' into retries-and-redirects
denisivan0v Nov 23, 2021
ba45f4c
TOC updated
denisivan0v Nov 23, 2021
90c75e1
table-check fix
denisivan0v Nov 23, 2021
5cd8846
preventing PR from auto-closing
denisivan0v Dec 16, 2021
52e17bf
preventing PR from auto-closing
denisivan0v Dec 30, 2021
939efee
Merge branch 'main' into retries-and-redirects
denisivan0v Jan 25, 2022
9071d9b
preventing PR from auto-closing
denisivan0v Jan 27, 2022
bb26521
Feedback addressed
denisivan0v Feb 1, 2022
6126bed
Update specification/trace/semantic_conventions/http.md
denisivan0v Feb 2, 2022
bb2c4e0
Typo
denisivan0v Feb 2, 2022
05bcac7
Links part temporary removed
denisivan0v Mar 2, 2022
12a879d
Merge branch 'main' into retries-and-redirects
denisivan0v Mar 2, 2022
f39ac22
Merge branch 'main' into retries-and-redirects
bogdandrutu Mar 5, 2022
7f7d801
Split retries and redirects into own headings
denisivan0v Mar 8, 2022
d09044a
Merge branch 'retries-and-redirects' of https://github.com/denisivan0…
denisivan0v Mar 8, 2022
dd4312f
Trigger CI build
denisivan0v Mar 8, 2022
49f9dd2
Bookmark fix
denisivan0v Mar 8, 2022
91a7cad
Merge branch 'main' into retries-and-redirects
tigrannajaryan Mar 9, 2022
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ release.
([#1916](https://github.com/open-telemetry/opentelemetry-specification/pull/1916))
- Change meaning and discourage use of `faas.trigger` for FaaS clients (outgoing).
([#1921](https://github.com/open-telemetry/opentelemetry-specification/pull/1921))
- Define span structure for HTTP retries and redirects.
([#2078](https://github.com/open-telemetry/opentelemetry-specification/pull/2078))
- Clarify difference between container.name and k8s.container.name
([#1980](https://github.com/open-telemetry/opentelemetry-specification/pull/1980))

Expand Down
7 changes: 7 additions & 0 deletions semantic_conventions/trace/http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ groups:
brief: >
The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.
examples: 5493
- id: retry_count
type: int
brief: >
The ordinal number of request re-sending attempt.
required:
conditional: If and only if a request was retried.
examples: 3
- ref: net.peer.name
sampling_relevant: true
- ref: net.peer.ip
Expand Down
8 changes: 8 additions & 0 deletions specification/trace/semantic_conventions/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and various HTTP versions like 1.1, 2 and SPDY.
- [Status](#status)
- [Common Attributes](#common-attributes)
* [HTTP request and response headers](#http-request-and-response-headers)
* [HTTP request retries and redirects](#http-request-retries-and-redirects)
- [HTTP client](#http-client)
- [HTTP server](#http-server)
* [HTTP server definitions](#http-server-definitions)
Expand Down Expand Up @@ -70,6 +71,7 @@ Don't set the span status description if the reason can be inferred from `http.s
| `http.request_content_length_uncompressed` | int | The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used. | `5493` | No |
| `http.response_content_length` | int | The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size. | `3495` | No |
| `http.response_content_length_uncompressed` | int | The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used. | `5493` | No |
| `http.retry_count` | int | The ordinal number of request re-sending attempt. | `3` | If and only if a request was retried. |
| [`net.peer.ip`](span-general.md) | string | Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6) | `127.0.0.1` | No |
| [`net.peer.name`](span-general.md) | string | Remote hostname or similar, see note below. | `example.com` | No |
| [`net.peer.port`](span-general.md) | int | Remote port number. | `80`; `8080`; `443` | No |
Expand Down Expand Up @@ -121,6 +123,12 @@ Users MAY explicitly configure instrumentations to capture them even though it i

[network attributes]: span-general.md#general-network-connection-attributes

### HTTP request retries and redirects

A span for each subsequent HTTP request re-sending attempt MUST be created and it SHOULD be linked with a previous one by creating a single `Link`. `http.retry_count` attribute SHOULD be added to each retry span with the value that reflects the ordinal number of request retry attempt.

A span for each subsequent HTTP request redirect MUST be created and it SHOULD be linked with a span for initial request or previous redirect by creating a single `Link`.

## HTTP client

This span type represents an outbound HTTP request.
Expand Down