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

Ensure that Datadog::Tracing::TraceSegment can be reported correctly when they are dropped #2335

Merged
merged 4 commits into from
Oct 26, 2022

Conversation

DougEdey
Copy link

What does this PR do?

This proposes a fix for #2334

TraceSegment doesn't respond to map but the spans inside it do, so it should provide usable debug information going forward.

I'm not confident that the test is the best it can be, I'm just focused on the issue I've encountered, I had to change the logger statement to actually render the log line to ensure it works appropriately.

Motivation

I found the bug

Additional Notes

How to test the change?

@codecov-commenter
Copy link

Codecov Report

Merging #2335 (ecbac58) into master (0c66c3b) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2335      +/-   ##
==========================================
- Coverage   98.29%   98.29%   -0.01%     
==========================================
  Files        1092     1092              
  Lines       58041    58045       +4     
==========================================
+ Hits        57054    57056       +2     
- Misses        987      989       +2     
Impacted Files Coverage Δ
spec/ddtrace/transport/http/builder_spec.rb 100.00% <ø> (ø)
lib/ddtrace/transport/traces.rb 97.82% <100.00%> (ø)
spec/datadog/core/configuration_spec.rb 100.00% <100.00%> (ø)
spec/datadog/core_spec.rb 100.00% <100.00%> (ø)
spec/ddtrace/transport/traces_spec.rb 97.93% <100.00%> (+0.04%) ⬆️
...adog/tracing/contrib/sidekiq/client_tracer_spec.rb 97.91% <0.00%> (-2.09%) ⬇️
...adog/tracing/contrib/sidekiq/server_tracer_spec.rb 99.16% <0.00%> (-0.84%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

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

Thank you so much, @DougEdey!

I've made a few changes, but the scenario your reported is indeed problematic. 🙇

@marcotc marcotc merged commit ba2a1d6 into DataDog:master Oct 26, 2022
@github-actions github-actions bot added this to the 1.6.0 milestone Oct 26, 2022
@DougEdey
Copy link
Author

Thanks @marcotc , I'm glad to see this fixed

@TonyCTHsu TonyCTHsu mentioned this pull request Nov 15, 2022
@DougEdey DougEdey deleted the de/handle_trace_spans branch January 10, 2023 20:21
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

3 participants