rnburn / zipkin-cpp-opentracing

OpenTracing Tracer implementation for Zipkin in C++
Apache License 2.0
51 stars 45 forks source link

GCP/Stackdriver header support #43

Open fredr opened 4 years ago

fredr commented 4 years ago

We use GCP as our cloud provider, and for our kubernetes clusters we use the nginx-ingress with opentracing enabled, and we have a zipkin-gcp deployment that upload traces from the ingress to stackdriver.

That works fine, but when a request coming from an other google service like AppEngine, the x-cloud-trace-context-header is set, but since this lib ignores that header, the nginx-ingress trace will not be recored with the same trace-id etc, so they will not get connected.

The outgoing request will also have both the x-cloud-trace-context-header, and the x-b3-*-headers. Making everything confusing for the next service.

Would support for this header be something you could consider adding to this lib? or do you deem it out of scope? or do you see any other way of getting around this without having to write a whole new opentracing lib for stackdriver?

fredr commented 4 years ago

I've made a (quick and dirty) custom version of the lib, for debuggin, that propagates the x-cloud-trace-context header instead of the b3 headers.