question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trace id can't be decoded by agent due to being transmitted as float

See original GitHub issue

My 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:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
realarkcommented, Oct 18, 2018

@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.

0reactions
tylerbensoncommented, Oct 24, 2018

Fix is included in 0.17.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Technical distributed tracing details - New Relic Documentation
This is a float value set by the first New Relic agent that's part of the request so all data in the trace...
Read more >
Database Engine events and errors - SQL Server
Consult this MSSQL error code list to find explanations for error messages for SQL Server database engine events.
Read more >
EPIRB (Emergency Position Indicating Radio Beacon)
It is tracking equipment that transmits a signal on a specified band to locate a lifeboat, life raft, ship or people in distress....
Read more >
LTTng v2.13 — LTTng Documentation
You can attach such programs to tracepoints and kprobes thanks to a ... have LTTng trace Python applications, pass the --enable-python-agent ...
Read more >
VRL function reference | Vector documentation
Decodes the value (a Base64 string) into its original string. ... There is the possibility of precision loss due to float arithmetic when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found