Skip to content

Commit e1c38c1

Browse files
mabdinurwantsui
andauthored
docs(tracing): update trace header configuration (#15015)
## Description Resolves: #15004 Removes misleading `trace_headers` documentation. --------- Co-authored-by: wantsui <[email protected]>
1 parent 9ae8e44 commit e1c38c1

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

docs/advanced_usage.rst

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -391,34 +391,16 @@ Headers tracing
391391

392392
For a selected set of integrations, it is possible to store http headers from both requests and responses in tags.
393393

394-
The recommended method is to use the ``DD_TRACE_HEADER_TAGS`` environment variable.
394+
Use the ``DD_TRACE_HEADER_TAGS`` environment variable to configure trace headers.
395395

396-
This configuration can be provided both at the global level and at the integration level in your application code, or it
397-
can be set via the Datadog UI (UI functionality in beta as of version 2.5.0).
396+
Example::
398397

399-
Examples::
400-
401-
from ddtrace import config
402-
403-
# Global config
404-
config.trace_headers([
405-
'user-agent',
406-
'transfer-encoding',
407-
])
408-
409-
# Integration level config, e.g. 'falcon'
410-
config.falcon.http.trace_headers([
411-
'user-agent',
412-
'some-other-header',
413-
])
398+
export DD_TRACE_HEADER_TAGS="user-agent,content-type,authorization"
414399

415400
The following rules apply:
416401
- headers configuration is based on a whitelist. If a header does not appear in the whitelist, it won't be traced.
417402
- headers configuration is case-insensitive.
418-
- if you configure a specific integration, e.g. 'requests', then such configuration overrides the default global
419-
configuration, only for the specific integration.
420-
- if you do not configure a specific integration, then the default global configuration applies, if any.
421-
- if no configuration is provided (neither global nor integration-specific), then headers are not traced.
403+
- if no configuration is provided, then headers are not traced.
422404

423405

424406
Once you configure your application for tracing, you will have the headers attached to the trace as tags, with a

0 commit comments

Comments
 (0)