Trace id can't be decoded by agent due to being transmitted as float
See original GitHub issueMy team is currently experimenting with tracing a system that in part consists of Python and Java applications. On the Python side of things we use dd-trace-py. All outgoing requests include the following headers for distributed tracing:
{ 'x-datadog-trace-id': str(tracer.current_span().trace_id), 'x-datadog-parent-id': str(tracer.current_span().span_id) }
These ids are as far as I understand 64-bit unsigned integers.
When a Java application receive a request with such headers and try to submit them to the trace agent, the id will be incorrectly (imo) encoded by msgpack as float64
rather than uint64
. The trace agent expect the trace id to be an int so it throws the following error and drops the traces:
ERROR (receiver.go:386) - cannot decode v0.4 traces payload: msgp: attempted to decode type "float64" with method for "int"
I have created a ticket in the msgpack-java repository which can be found here. I’m posting this here because there may be others that have this problem, and I thought I’d let you know.
Currently we’ve worked around this by swapping out the objectMapper
in DDApi
, with the unfortunate use of reflection, to a subclass that use a MessagePackGenerator
that contains the fix suggested in the pull request related to the issue ticket linked above.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
@aesy Thank you so much for the fix! This will ship in our 0.17.0 release (estimated to go out next week).
Will close this issue once the release ships.
Fix is included in 0.17.0.