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

Add context propagation requirements to HTTP conventions #1783

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ release.
- Remove `rpc.jsonrpc.method`, clarify that `rpc.method` should be used instead.
([#1748](https://github.com/open-telemetry/opentelemetry-specification/pull/1748))

lmolkova marked this conversation as resolved.
Show resolved Hide resolved
- Add context propagation requirements to HTTP spec.
([TODO](https://github.com/open-telemetry/opentelemetry-specification/pull/TODO))

### Compatibility

### OpenTelemetry Protocol
Expand Down
6 changes: 6 additions & 0 deletions specification/trace/semantic_conventions/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and various HTTP versions like 1.1, 2 and SPDY.
- [Status](#status)
- [Common Attributes](#common-attributes)
- [HTTP client](#http-client)
- [Context propagation](#context-propagation)
- [HTTP server](#http-server)
- [HTTP server definitions](#http-server-definitions)
- [HTTP Server semantic conventions](#http-server-semantic-conventions)
Expand Down Expand Up @@ -111,6 +112,11 @@ from the `net.peer.name`
used to look up the `net.peer.ip` that is actually connected to.
In that case it is strongly recommended to set the `net.peer.name` attribute in addition to `http.host`.

### Context propagation

- context created for HTTP client span MUST be injected on outgoing request using configured [propagator](../../context/api-propagators.md)
Copy link
Member

@cijothomas cijothomas Jun 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this addition can be for not just http, but every instrumentation dealing with out-of-proc communication?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, if this direction is supported by the community, I can update other relevant specs, I can also update propagators doc to mention it.

- if outgoing HTTP request already has context (for configured propagator) injected, it cannot be changed and new span MUST not be created
lmolkova marked this conversation as resolved.
Show resolved Hide resolved

## HTTP server

To understand the attributes defined in this section, it is helpful to read the "Definitions" subsection.
Expand Down