-
Notifications
You must be signed in to change notification settings - Fork 309
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
Corrupt msgpack encoding #970
Comments
This is certainly quite odd. For reference, we encode MessagePack manually, rather than using an off-the-shelf library. A few questions:
|
Turns out this is an issue with moleculer (microservice framework) implementation of a Datadog trace exporter. (See moleculerjs/moleculer#725 (comment).) Basically, it's overwriting the Additionally, once a span with a bad id has been encoded, all future encodes will also be corrupt, even spans with valid ids (like the one in the original post's example), due to the reuse of a previously-corrupted I'm not sure if there's any work to be done here, given that the issue appears to be misuse of the library's private internals, but this may spark some ideas for improvement on your end. I will also likely file the agent crash as a memory leak issue. |
Using these externally is definitely not supported since they are internal APIs. I left a comment on moleculerjs/moleculer#725 to try to see how we can improve the situation. |
#976 truncates the IDs to 8 bytes. This should prevent corrupting the |
Fix released in 0.21.1 |
Describe the bug
I noticed my agents are periodically crashing after a bunch of trace decoding errors.
Agent log
So I turned on debug logging in
dd-trace
in my app to inspect the trace payloads. Here's a sample span that was logged by the tracer:The printed buffer appears to be corrupt:
It should be:
Oddly, when I add this span data to the encoder unit tests in the
dd-trace
project, it encodes correctly. So I'm stumped. Any idea why the printed trace and encoded buffer don't match? Is this the cause of the agent decoding errors?Environment
The text was updated successfully, but these errors were encountered: