Skip to content

fix: Fix the array encoding length of datadog version 05 exporter #1002

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

Merged
merged 6 commits into from
Mar 25, 2023

Conversation

glynnmccabe
Copy link
Contributor

Fixes the array encoding length used for datadog version 05 api exporting. This is causing #970

@glynnmccabe glynnmccabe requested a review from a team March 21, 2023 01:37
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 21, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: glynnmccabe / name: Glynn (fb2154a)

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Patch coverage: 100.0% and project coverage change: -0.1 ⚠️

Comparison is base (675de34) 69.9% compared to head (2a00fca) 69.9%.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1002     +/-   ##
=======================================
- Coverage   69.9%   69.9%   -0.1%     
=======================================
  Files        116     116             
  Lines       9027    9027             
=======================================
- Hits        6316    6315      -1     
- Misses      2711    2712      +1     
Impacted Files Coverage Δ
opentelemetry-datadog/src/exporter/mod.rs 25.8% <ø> (ø)
opentelemetry-datadog/src/exporter/model/mod.rs 78.5% <ø> (ø)
opentelemetry-datadog/src/exporter/model/v05.rs 85.8% <100.0%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@djc
Copy link
Contributor

djc commented Mar 21, 2023

I feel this is like #903 in that we really should be using some derive-based encoding of types to send Datadog messages, instead of the raw MessagePack encoding that we're doing here.

@glynnmccabe
Copy link
Contributor Author

glynnmccabe commented Mar 21, 2023

In this case it seems that the span array is always 12 elements long regardless of other improvements we might want, or am I missing something? #903 is what broke this for v05

@TommyCpp
Copy link
Contributor

Another issue is we don't have access to Datadog backend to verify any fix so it's tricky

@glynnmccabe
Copy link
Contributor Author

glynnmccabe commented Mar 21, 2023

Running the datadog agent locally the current version will not accept traces with a 400 error and will accept them with the change.

There is also a test agent which also will not accept traces with a value that is not 12 - https://github.com/DataDog/dd-apm-test-agent/blob/cc71f96050a79bbe114b9e82005d92a7a8ca1e4f/ddapm_test_agent/trace.py#L304

@hdost
Copy link
Contributor

hdost commented Mar 23, 2023

Running the datadog agent locally the current version will not accept traces with a 400 error and will accept them with the change.

There is also a test agent which also will not accept traces with a value that is not 12 - https://github.com/DataDog/dd-apm-test-agent/blob/cc71f96050a79bbe114b9e82005d92a7a8ca1e4f/ddapm_test_agent/trace.py#L304

I've tried running the example against the test agent and I get failures even with your patch.
What are you using to test?

@glynnmccabe
Copy link
Contributor Author

Running the datadog agent locally the current version will not accept traces with a 400 error and will accept them with the change.
There is also a test agent which also will not accept traces with a value that is not 12 - https://github.com/DataDog/dd-apm-test-agent/blob/cc71f96050a79bbe114b9e82005d92a7a8ca1e4f/ddapm_test_agent/trace.py#L304

I've tried running the example against the test agent and I get failures even with your patch. What are you using to test?

Datadog agent 7.43.1, although I have used the test agent previously.

Are the failures you see related to headers? The test agent expects some headers that this exporter doesn't send, but don't seem to be required by the actual agent. If so turning off the invariant checks listed here would fix that. https://github.com/DataDog/dd-apm-test-agent#trace-invariant-checks

@TommyCpp TommyCpp mentioned this pull request Mar 25, 2023
Copy link
Contributor

@TommyCpp TommyCpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the fix!

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 this pull request may close these issues.

None yet

4 participants