Distributed tracing is impossible to implement
See original GitHub issueIn addition to #508, there is another big issue with this library.
The only way to get the tracer to work now is to use the OpenTracingTracerFactory
. It returns a wrapper that implements ITracer
but underneath calls the Tracer
. So far so good, except I can’t use the existing Tracer
, so I submitted #513.
Now, I want to do distributed tracing and therefore I need to extract or inject the context from a message. I am not using http apis, I use a message broker or event streams. In OpenTracing
library, it is quite trivial - create a text map and ask it to serialize or deserialize the dictionary. But what works fine with OpenTracing
, suddenly starts to break with Datadog.Trace.OpenTracing
, because it expects that I have ICodec
implemented in my parser. That would also be ok, but this interface, like many other interfaces and classes in this library, is internal. So, here comes the full stop and I am unable to move anywhere.
Even if I take the code from Datadog.Trace.OpenTracing
, which is not a lot, it again has references to the Datadog.Trace
library own internal classes.
All in all, I concluded that there’s no way I can ever implement distributed tracing with Datadog and being five days from the end of our trial period, where everything else is (almost) very good, this is a huge blocked for us to engage with Datadog.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (10 by maintainers)
Top GitHub Comments
I have checked the whole thing closer and I now understand that as soon as I give the Datadog tracer the http header built-in format (
BuiltinFormats.HttpHeaders
) it will use it. Maybe, just adding the sameHttpHeaderCodec
to the_codecs
dictionary for theBuiltinFormats.TextMap
would be a very good step forward. The OpenTracing .NET lib has just two built-in formats and if both of them are supported - I personally would be happy.In the future, I’d love to see something similar to the extractor/injector registry like in Jaeger library, but that’s a bit more work.
@alanisaac added support for
BuiltinFormats.TextMap
. Closing this issue since that change was included in release 1.16.0.