dd-opentracing-cpp icon indicating copy to clipboard operation
dd-opentracing-cpp copied to clipboard

Add support for `DD_TRACE_HEADER_TAGS`

Open ziquanmiao opened this issue 3 years ago • 1 comments

For a lot of my organization's APIs, we add important information in the request headers of our API calls

Given our use of Envoy-- it does not look like there is functionality to propagate header metadata into span attributes, I am hoping we can have a similar functionality to DD_TRACE_HEADER_TAGS as seen in Datadog's .Net tracer or in Java to propagate these important header arguments into our span attributes for troubleshooting purposes

ziquanmiao avatar Jul 06 '22 18:07 ziquanmiao

You might be able to use this:

  • https://www.envoyproxy.io/docs/envoy/latest/api-v3/type/tracing/v3/custom_tag.proto#envoy-v3-api-msg-type-tracing-v3-customtag
  • via https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto#envoy-v3-api-field-extensions-filters-network-http-connection-manager-v3-httpconnectionmanager-tracing-custom-tags
  • via https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing#what-data-each-trace-contains

I'll have to look into it more.

Envoy's Datadog integration is currently frozen, so even if we implemented DD_TRACE_HEADER_TAGS in this library, it wouldn't make it upstream to Envoy for quite a while.

dgoffredo avatar Sep 01 '22 07:09 dgoffredo