There is no way to disable those at the moment.
It's easy to add such basic functionality, however I doubt that having the ability to completely disable trace context headers would be very useful. More likely this will be useful to be done only for specific destinations, and this is a bit more tricky to get right.
Harshith, what exactly would you want to be able to do? Is completely disabling the addition of outgoing headers useful in your case? This means that distributed tracing won't be supported for any outgoing communication from this service. Alternatively, what kind of destination information would be useful for you, for example - destination hostname? Something else?
@Eyal_Koren The problem is that it's very hard to convince banks to accept these headers, mostly impossible. We don't use the distributed tracing functionality, so we would need some mechanism to disable these headers.
Following up on this - we discussed this option.
What we are currently thinking is:
adding a boolean config to disable headers injection on all outgoing requests, which means losing the distributed tracing capability on all downstream services (not affecting the ability to connect the transaction of the configured service with the upstream parts of the trace)
we currently think that having the ability to configure something similar only for specific outgoing communication may be an overkill, so if this need arises, the workaround would be to set up a proxy that strips off unwanted headers where required
@stephenb you said you were recently asked about this, do think this would be useful?
@e03c5fccb551b6833a65 Please replace your current Java agent with this snapshot, add the new configuration option disable_outgoing_tracecontext_headers=true and let me know if this solved the issue for you.