Skip to content

Adding Baggage Span Tags docs #29821

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 10 commits into from
Jun 10, 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
20 changes: 20 additions & 0 deletions content/en/tracing/trace_collection/library_config/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,26 @@ The following configuration options behave consistently across the latest versio
- `cf-connecting-ip`
- `cf-connecting-ipv6`

### Context propagation
`DD_TRACE_BAGGAGE_MAX_ITEMS`
: **Default**: `64` <br>
**Supported Input**: A positive integer <br>
**Description**: The maximum number of key-value pairs in the baggage header.

`DD_TRACE_BAGGAGE_MAX_BYTES`
: **Default**: `8192` <br>
**Supported Input**: A positive integer <br>
**Description**: The maximum number of bytes in the baggage header value. Values less than 3 bytes prevent propagation, because this is the minimum size for a valid key-value pair (for example, `k=v`).

`DD_TRACE_BAGGAGE_TAG_KEYS`
: **Default**: `user.id,session.id,account.id` <br>
**Supported Input**: A comma-separated string representing a list of case-sensitive baggage keys <br>
**Caveats**: Not supported in Java, Ruby, Go, C++, and .NET <br>
**Description**: A comma-separated list of baggage keys that are automatically applied as span tags to the local root span. For example, a baggage key `user.id` is tagged as `baggage.user.id` <br>
This feature only applies to baggage extracted from incoming HTTP headers. Baggage set with the baggage API is not included.
- To tag all baggage items, set the value to `*`. Use this with caution to avoid exposing sensitive data in tags.
- To disable this feature, set the value to an empty string.


[1]: /developers/community/libraries/#apm-tracing-client-libraries
[2]: /tracing/trace_collection/compatibility/java/#framework-integrations-disabled-by-default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,13 @@ When the Datadog SDK is configured with the None format for extraction or inject

### Baggage

_Currently available in Python, Ruby, PHP, Java, Node.js, C++, Go and .NET. For other languages, please reach out to [Support][11]_

By default, Baggage is automatically propagated through a distributed request using OpenTelemetry's [W3C-compatible headers][10]. To disable baggage, set [DD_TRACE_PROPAGATION_STYLE][12] to `datadog,tracecontext`.

#### Adding baggage as span tags
_Available in Python, PHP, and Node.js. For other languages, reach out to [Support][11]_

By default, `user.id,session.id,account.id` baggage keys are added as span tags. To customize this configuration, see [Context Propagation Configuration][13]. Specified baggage keys are automatically added as span tags `baggage.<key>` (for example, `baggage.user.id`).

## Further reading

{{< partial name="whats-next/whats-next.html" >}}
Expand All @@ -661,3 +664,4 @@ By default, Baggage is automatically propagated through a distributed request us
[10]: https://www.w3.org/TR/baggage/
[11]: /help
[12]: #customize-trace-context-propagation
[13]: /tracing/trace_collection/library_config#context-propagation
Loading