Skip to content
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

Datadog reporter doesn't handle 128-bit trace IDs #1032

Closed
dvgica opened this issue Jun 1, 2021 · 3 comments · Fixed by #1040
Closed

Datadog reporter doesn't handle 128-bit trace IDs #1032

dvgica opened this issue Jun 1, 2021 · 3 comments · Fixed by #1040

Comments

@dvgica
Copy link
Contributor

dvgica commented Jun 1, 2021

If your application receives a 128-bit trace ID, say from an x-b3-trace-id header, and then the application tries to report a span with it, reporting will fail because the Datadog agent expects a 64-bit Int for the trace ID. I discovered this a while ago and have since worked around it using a custom KamonDataDogTranslator, but I think the failure mode was that the DD agent discarded the reported trace because the trace ID was too large - it showed up in the DD agent logs.

Regardless, it seems like DdSpanReporter should use the lower 64 bits of a 128-bit trace ID. Lower, because, as a result of testing, I've determined that the official Datadog agent does the same when encountering a 128 bit trace ID in a B3 header, and you want Kamon to be compatible with a mixed environment using the Datadog agent as well.

@dvgica
Copy link
Contributor Author

dvgica commented Jun 1, 2021

If this sounds about right, @ivantopo, I can do the fix.

@SimunKaracic
Copy link
Contributor

This sounds completely right, feel free to implement the fix! :D

@dvgica
Copy link
Contributor Author

dvgica commented Jun 15, 2021

@SimunKaracic thanks for the confirmation. Pull request with the fix is up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants