dd-trace-java
dd-trace-java copied to clipboard
Can we disable injection of DD tracing headers for some requests?
Hi, I have a question related to the automatic injection of tracing headers.
I am using Apache HTTP client and I noticed trace agent automatically adds these headers:
X-Datadog-Parent-Id: 920498374318.......
X-Datadog-Sampling-Priority: 1
X-Datadog-Trace-Id: 1844094....
I would like to not have these injected for some requests, going to external parties. How can I achieve that?
I don't want to remove them from all places, mind you, just for this single particular HTTP client meant to be used with external services.
@milanaleksic unfortunately this does not exist yet in the Java library. Would a list of http hosts to not send to work for you?
@milanaleksic unfortunately this does not exist yet in the Java library. Would a list of http hosts to not send to work for you?
Hi @devinsba. It wouldn't help since the target hosts are unknown (our customers are free to enter target 3rd party systems to which these requests will be sent).
Ok, good to know. Would a list of allowed hosts work? IE: only send the headers to listed hosts?
Ok, good to know. Would a list of allowed hosts work? IE: only send the headers to listed hosts?
That would be good enough for sure! Thanks for considering