You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(baggage): auto-adding baggage to span tags (#13200)
Automatically adding baggage key-value pairs to span tags with the
'baggage.' prefix. Introducing DD_TRACE_BAGGAGE_TAG_KEYS config.
[RFC](https://docs.google.com/document/d/1ZsgAcQHKjaBxDmhHup0zqFz07WYiOrbBksHPoXJe6u4/edit?tab=t.0#heading=h.q69qzmye8dfb)
## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Copy file name to clipboardExpand all lines: docs/configuration.rst
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -914,6 +914,20 @@ Other
914
914
version_added:
915
915
v1.15.0:
916
916
917
+
DD_TRACE_BAGGAGE_TAG_KEYS:
918
+
type: String
919
+
default: "user.id,account.id,session.id"
920
+
921
+
description: |
922
+
A comma-separated list of baggage keys to be automatically attached as tags on spans.
923
+
For each key specified, if a corresponding baggage key is present and has a non-empty value,
924
+
the key-value pair will be added to the span's metadata using the key name formatted as ``baggage.<key>``.
925
+
If you want to turn off this feature, set the configuration value to an empty string.
926
+
When set to `*`, **all** baggage keys will be converted into span tags. Use with caution: this may unintentionally expose sensitive or internal data if not used intentionally.
927
+
928
+
version_added:
929
+
v3.6.0:
930
+
917
931
.. _Unified Service Tagging: https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/
918
932
919
933
.. _Configure the Datadog Tracing Library: https://docs.datadoghq.com/tracing/trace_collection/library_config/
baggage: Adds support for automatically adding baggage key-value pairs to span tags. Baggage items from incoming HTTP headers are attached to spans as tags with a `baggage.` prefix
5
+
The `DD_TRACE_BAGGAGE_TAG_KEYS` configuration allows users to specify a comma-separated list of baggage keys for span tagging, by default the value is set to `user.id,account.id,session.id`.
6
+
When set to `*`, all baggage keys will be converted into span tags. Setting it to an empty value disables baggage tagging.
0 commit comments