Skip to content

Add Baggage as Default Propagator #29060

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

Merged
merged 7 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions content/en/tracing/trace_collection/library_config/cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ When multiple values are given, the order of matching is based on the order of v

`DD_TRACE_PROPAGATION_STYLE_INJECT`
: **Since**: v0.1.6 <br>
**Default**: `datadog,tracecontext` <br>
**Accepted values**: `datadog`, `tracecontext`, `b3` <br>
**Default**: `datadog,tracecontext,baggage` <br>
**Accepted values**: `datadog`, `tracecontext`, `b3`, `baggage` <br>
Comma separated list of propagation styles to use when injecting tracing context.
When multiple values are given, the order of matching is based on the order of values.

`DD_TRACE_PROPAGATION_STYLE_EXTRACT`
: **Since**: v0.1.6 <br>
**Default**: `datadog,tracecontext` <br>
**Accepted values**: `datadog`, `tracecontext`, `b3` <br>
**Default**: `datadog,tracecontext,baggage` <br>
**Accepted values**: `datadog`, `tracecontext`, `b3`, `baggage` <br>
Comma separated list of propagation styles to use when extracting tracing context.
When multiple values are given, the order of matching is based on the order of values.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,17 @@ Note that UDS is only supported on .NET Core 3.1 and above.<br>
For information about valid values and using the following configuration options, see [Trace Context Propagation][21].

`DD_TRACE_PROPAGATION_STYLE_INJECT`
: **Default**: `datadog,tracecontext`<br>
: **Default**: `datadog,tracecontext,baggage`<br>
A comma-separated list of header formats to include to propagate distributed traces between services.<br>
Available since version `2.20.0`

`DD_TRACE_PROPAGATION_STYLE_EXTRACT`
: **Default**: `datadog,tracecontext`<br>
: **Default**: `datadog,tracecontext,baggage`<br>
A comma-separated list of header formats from which to attempt to extract distributed tracing propagation data. The first format found with complete and valid headers is used to define the trace to continue.<br>
Available since version `2.20.0`

`DD_TRACE_PROPAGATION_STYLE`
: **Default**: `datadog,tracecontext`<br>
: **Default**: `datadog,tracecontext,baggage`<br>
A comma-separated list of header formats from which to attempt to inject and extract distributed tracing propagation data. The first format found with complete and valid headers is used to define the trace to continue. The more specific `DD_TRACE_PROPAGATION_STYLE_INJECT` and `DD_TRACE_PROPAGATION_STYLE_EXTRACT` configuration settings take priority when present.<br>
Available since version `2.20.0`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,17 @@ Note that Unix Domain Sockets (UDS) are not supported on .NET Framework.<br>
For information about valid values and using the following configuration options, see [Trace Context Propagation][21].

`DD_TRACE_PROPAGATION_STYLE_INJECT`
: **Default**: `datadog,tracecontext`<br>
: **Default**: `datadog,tracecontext,baggage`<br>
A comma-separated list of header formats to include to propagate distributed traces between services.<br>
Available since version `2.20.0`

`DD_TRACE_PROPAGATION_STYLE_EXTRACT`
: **Default**: `datadog,tracecontext`<br>
: **Default**: `datadog,tracecontext,baggage`<br>
A comma-separated list of header formats from which to attempt to extract distributed tracing propagation data. The first format found with complete and valid headers is used to define the trace to continue.<br>
Available since version `2.20.0`

`DD_TRACE_PROPAGATION_STYLE`
: **Default**: `datadog,tracecontext`<br>
: **Default**: `datadog,tracecontext,baggage`<br>
A comma-separated list of header formats from which to attempt to inject and extract distributed tracing propagation data. The first format found with complete and valid headers is used to define the trace to continue. The more specific `DD_TRACE_PROPAGATION_STYLE_INJECT` and `DD_TRACE_PROPAGATION_STYLE_EXTRACT` configuration settings take priority when present.<br>
Available since version `2.20.0`

Expand Down
2 changes: 1 addition & 1 deletion content/en/tracing/trace_collection/library_config/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Added in version 1.26.0.
### Trace context propagation

`DD_TRACE_PROPAGATION_STYLE`
: **Default**: `datadog,tracecontext` <br>
: **Default**: `datadog,tracecontext,baggage` <br>
Configures trace header injection and extraction style. See [Propagating Go Trace Context][18] for more information.

## Configure APM environment name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,17 @@ For information about valid values and using the following configuration options

`DD_TRACE_PROPAGATION_STYLE_INJECT`
: **Configuration**: `tracePropagationStyle.inject`<br>
**Default**: `Datadog,tracecontext`<br>
**Default**: `Datadog,tracecontext,baggage`<br>
A comma-separated list of header formats to include to propagate distributed traces between services.

`DD_TRACE_PROPAGATION_STYLE_EXTRACT`
: **Configuration**: `tracePropagationStyle.extract`<br>
**Default**: `Datadog,tracecontext`<br>
**Default**: `Datadog,tracecontext,baggage`<br>
A comma-separated list of header formats from which to attempt to extract distributed tracing propagation data. The first format found with complete and valid headers is used to define the trace to continue.

`DD_TRACE_PROPAGATION_STYLE`
: **Configuration**: `tracePropagationStyle`<br>
**Default**: `Datadog,tracecontext`<br>
**Default**: `Datadog,tracecontext,baggage`<br>
A comma-separated list of header formats from which to attempt to inject and extract distributed tracing propagation data. The first format found with complete and valid headers is used to define the trace to continue. The more specific `DD_TRACE_PROPAGATION_STYLE_INJECT` and `DD_TRACE_PROPAGATION_STYLE_EXTRACT` configurations take priority when present.

For more examples of how to work with the library see [API documentation][2].
Expand Down
7 changes: 5 additions & 2 deletions content/en/tracing/trace_collection/library_config/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,23 +482,25 @@ Read [Trace Context Propagation][11] for information about configuring the PHP t

`DD_TRACE_PROPAGATION_STYLE_INJECT`
: **INI**: `datadog.trace.propagation_style_inject`<br>
**Default**: `Datadog,tracecontext`<br>
**Default**: `Datadog,tracecontext,baggage`<br>
Propagation styles to use when injecting tracing headers. If using multiple styles, comma separate them. The supported styles are:

- [tracecontext][10]
- [b3multi][7]
- [B3 single header][8]
- Datadog
- [Baggage][22]

`DD_TRACE_PROPAGATION_STYLE_EXTRACT`
: **INI**: `datadog.trace.propagation_style_extract`<br>
**Default**: `Datadog,tracecontext,b3multi,B3 single header`<br>
**Default**: `Datadog,tracecontext,b3multi,B3 single header,baggage`<br>
Propagation styles to use when extracting tracing headers. If using multiple styles, comma separate them. The supported styles are:

- [tracecontext][10]
- [b3multi][7]
- [B3 single header][8]
- Datadog
- [Baggage][22]

### Integrations

Expand Down Expand Up @@ -681,3 +683,4 @@ When the application runs in a docker container, the path `/proc/self` should al
[19]: /tracing/trace_collection/compatibility/php/
[20]: /opentelemetry/interoperability/environment_variable_support
[21]: /tracing/trace_collection/library_config/#traces
[22]: https://www.w3.org/TR/baggage/
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ Enable [connecting logs and trace injection][6].
## Trace context propagation

`DD_TRACE_PROPAGATION_STYLE_INJECT`
: **Default**: `tracecontext,Datadog`<br>
: **Default**: `tracecontext,Datadog,baggage`<br>
Propagation styles to use when injecting tracing headers. For example, use `DD_TRACE_PROPAGATION_STYLE_INJECT=Datadog,B3` to inject both Datadog and B3 format headers.

`DD_TRACE_PROPAGATION_STYLE_EXTRACT`
: **Default**: Value of `DD_TRACE_PROPAGATION_STYLE_INJECT` (`tracecontext,Datadog`)<br>
: **Default**: Value of `DD_TRACE_PROPAGATION_STYLE_INJECT` (`tracecontext,Datadog,baggage`)<br>
Propagation styles to use when extracting tracing headers. When multiple values are given, it uses the first header match found. The order of matching is based on the order of values given. For example, `DD_TRACE_PROPAGATION_STYLE_EXTRACT=B3,Datadog` looks for `B3` headers first, and only uses `Datadog` headers if those are not available.

## Further Reading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Use the following environment variables to configure formats for reading and wri

`DD_TRACE_PROPAGATION_STYLE`
: Specifies trace context propagation formats for extraction and injection in a comma-separated list. May be overridden by extract-specific or inject-specific configurations.<br>
**Default**: `datadog,tracecontext` <br>
**Note**: With multiple formats, extraction follows the specified order (for example, `datadog,tracecontext` checks Datadog headers first). The first valid context continues the trace; additional valid contexts become span links.
**Default**: `datadog,tracecontext,baggage` <br>
**Note**: With multiple trace context formats, extraction follows the specified order (for example, `datadog,tracecontext` checks Datadog headers first). The first valid context continues the trace; additional valid contexts become span links. When `baggage` is included, it is added as [baggage](#baggage) to the existing context.

`OTEL_PROPAGATORS`
: Specifies trace context propagation formats for both extraction and injection (comma-separated list). Lowest precedence; ignored if any other Datadog trace context propagation environment variable is set.<br>
Expand Down Expand Up @@ -122,6 +122,7 @@ The Datadog Python SDK supports the following trace context formats, including d
|------------------------|---------------------------------|
| [Datadog][1] | `datadog` |
| [W3C Trace Context][2] | `tracecontext` |
| [Baggage][6] | `baggage` |
| [B3 Single][3] | `b3` |
| | `b3 single header` (deprecated) |
| [B3 Multi][4] | `b3multi` |
Expand All @@ -132,6 +133,7 @@ The Datadog Python SDK supports the following trace context formats, including d
[3]: https://github.com/openzipkin/b3-propagation#single-header
[4]: https://github.com/openzipkin/b3-propagation#multiple-headers
[5]: #none-format
[6]: https://www.w3.org/TR/baggage/

{{% /tab %}}

Expand All @@ -145,6 +147,7 @@ The Datadog Ruby SDK supports the following trace context formats, including dep
|------------------------|---------------------|
| [Datadog][1] | `datadog` |
| [W3C Trace Context][2] | `tracecontext` |
| [Baggage][6] | `baggage` |
| [B3 Single][3] | `b3` |
| [B3 Multi][4] | `b3multi` |
| [None][5] | `none` |
Expand All @@ -168,6 +171,7 @@ end
[3]: https://github.com/openzipkin/b3-propagation#single-header
[4]: https://github.com/openzipkin/b3-propagation#multiple-headers
[5]: #none-format
[6]: https://www.w3.org/TR/baggage/

{{% /tab %}}

Expand All @@ -181,6 +185,7 @@ The Datadog Go SDK supports the following trace context formats, including depre
|------------------------|---------------------|
| [Datadog][1] | `datadog` |
| [W3C Trace Context][2] | `tracecontext` |
| [Baggage][6] | `baggage` |
| [B3 Single][3] | `B3 single header` |
| [B3 Multi][4] | `b3multi` |
| | `b3` (deprecated) |
Expand All @@ -191,6 +196,7 @@ The Datadog Go SDK supports the following trace context formats, including depre
[3]: https://github.com/openzipkin/b3-propagation#single-header
[4]: https://github.com/openzipkin/b3-propagation#multiple-headers
[5]: #none-format
[6]: https://www.w3.org/TR/baggage/

{{% /tab %}}

Expand All @@ -204,6 +210,7 @@ The Datadog Node.js SDK supports the following trace context formats, including
|------------------------|---------------------|
| [Datadog][1] | `datadog` |
| [W3C Trace Context][2] | `tracecontext` |
| [Baggage][6] | `baggage` |
| [B3 Single][3] | `B3 single header` |
| [B3 Multi][4] | `b3multi` |
| | `B3` (deprecated) |
Expand All @@ -214,6 +221,7 @@ The Datadog Node.js SDK supports the following trace context formats, including
[3]: https://github.com/openzipkin/b3-propagation#single-header
[4]: https://github.com/openzipkin/b3-propagation#multiple-headers
[5]: #none-format
[6]: https://www.w3.org/TR/baggage/

{{% /tab %}}

Expand All @@ -227,6 +235,7 @@ The Datadog PHP SDK supports the following trace context formats, including depr
|------------------------|---------------------|
| [Datadog][1] | `datadog` |
| [W3C Trace Context][2] | `tracecontext` |
| [Baggage][6] | `baggage` |
| [B3 Single][3] | `B3 single header` |
| [B3 Multi][4] | `b3multi` |
| | `B3` (deprecated) |
Expand Down Expand Up @@ -319,6 +328,7 @@ Creating this surrounding trace to your consuming-processing logic ensures obser
[3]: https://github.com/openzipkin/b3-propagation#single-header
[4]: https://github.com/openzipkin/b3-propagation#multiple-headers
[5]: #none-format
[6]: https://www.w3.org/TR/baggage/

{{% /tab %}}

Expand All @@ -332,6 +342,7 @@ The Datadog C++ SDK supports the following trace context formats, including depr
|------------------------|---------------------|
| [Datadog][1] | `datadog` |
| [W3C Trace Context][2] | `tracecontext` |
| [Baggage][6] | `baggage` |
| [B3 Multi][4] | `b3` |
| | `b3multi` |
| [None][5] | `none` |
Expand Down Expand Up @@ -467,6 +478,7 @@ void handle_http_request(const Request& request, dd::Tracer& tracer) {
[3]: https://github.com/openzipkin/b3-propagation#single-header
[4]: https://github.com/openzipkin/b3-propagation#multiple-headers
[5]: #none-format
[6]: https://www.w3.org/TR/baggage/

{{% /tab %}}

Expand All @@ -480,6 +492,7 @@ The Datadog .NET SDK supports the following trace context formats, including dep
|------------------------|-------------------------------|
| [Datadog][1] | `datadog` |
| [W3C Trace Context][2] | `tracecontext` |
| [Baggage][9] | `baggage` |
| | `W3C` (deprecated) |
| [B3 Single][3] | `B3 single header` |
| | `B3SingleHeader` (deprecated) |
Expand Down Expand Up @@ -595,7 +608,7 @@ void SetHeaderValues(MessageHeaders headers, string name, string value)
[6]: https://github.com/DataDog/dd-trace-dotnet/releases/tag/v2.48.0
[7]: https://github.com/DataDog/dd-trace-dotnet/releases/tag/v2.22.0
[8]: https://github.com/DataDog/dd-trace-dotnet/releases/tag/v2.42.0

[9]: https://www.w3.org/TR/baggage/

{{% /tab %}}

Expand Down
Loading