-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Haystack trace propagation #146
Comments
Hi @ldoin , we'd be open to this. The existing propagation code will probably need changing so that Datadog, B3 and Haystack work correctly and usefully. There's a few different combinations of services and tracing implementation where it's not clear the right way to behave.
For both of those cases, it seems there'd be incomplete traces in both systems, and some way is needed to correlate them. There's a few ways to do it, and I'm not sure the correct one. |
Hello @cgilmour, glad to hear you guys are on board. We are currently trying to solve the challenges you've described, so I actually have an internal version of dd-trace-java being tested to see how it would address those exact points. If things pan out, I will be making another PR to the dd-trace-java repo with the enhancements for your consideration. 😜 If you have any ideas or proposals of your own, we would love to hear them or sync up on the possible approaches to tackle those. |
Great! Yup, I have a few thoughts on this, and overall there's no single "perfect" answer for dealing with this. The current C++ implementation for Datadog+B3 headers is a bit confusing. The reason for questions about how things would be correlated is quite important. The way I think it should work is.. a long explanation. When extracting traces, the datadog headers should always be supported and used for the trace ID. One additional "other propagation headers" can also be extracted. There's the When starting a trace, if it has a datadog trace ID to use, then it uses that to continue the trace. If it didn't receive one, then a new trace is started. The spans for that trace get tagged with that one "other propagation headers", eg: The tricky decision here is related to propagated sampling decisions. Finally when injecting traces, there's another variable that controls it: It'd be nice to ignore "baggage" headers completely, but some thought should still be applied on that topic. I don't know the right answer, but probably:
The bit below is still referring to this example setup: Services A, B and C: A and C report to Haystack and B reports to datadog. A starts the trace, and to make it work through B and C, haystack headers need to be sent. The final thing to consider is whether we modify the span ID for "other propagation headers" when injecting. |
@cgilmour - Here is the proposed implementation of what we were thinking in Java - DataDog/dd-trace-java#1691 We internally did some tests and things appear to be stitching correctly. Let us know what you think on this approach, and maybe we can narrow it to the acceptable final result together! |
I'm working on a service receiving requests that come from an external system using Haystack as a tracing system. To maintain complete traces between the two systems and still use datadog internally It would be great to have support for Haystack.
I have seen that the java agent has support for it (see DataDog/dd-trace-java#895) and was wondering if you would be open to a contribution to add this for the cpp tracer ?
The text was updated successfully, but these errors were encountered: