-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix(agent): Fixes 8T distributed traces #724
Conversation
When using 8T the 'parentId' intrinics attribute was not being set for the root span of a service based on the inbound header. This caused fragmented traces. This commit added the required 'parentId' attribute. Normal DT (not 8T) was working correctly because the 'parentId' was being added to a span returned from nr_segement_to_span_event() in a different code path dedicated to JSON creation starting with nr_segment_tree_finalise(). A test in test_segment.c was modified to check that the 'parentId' is correctly set based on the inbound DT header.
Codecov Report
@@ Coverage Diff @@
## dev #724 +/- ##
==========================================
- Coverage 78.68% 78.15% -0.53%
==========================================
Files 188 188
Lines 26204 25887 -317
==========================================
- Hits 20618 20232 -386
- Misses 5586 5655 +69
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 25 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this 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 finding and fixing.
When using 8T the 'parentId' intrinsics attribute was not being set for
the root span of a service to a value based on the inbound header. This caused
fragmented traces. This commit added the required 'parentId' attribute.
Normal DT (not 8T) was working correctly because the 'parentId' was
being added to a span returned from nr_segement_to_span_event()
in a different code path dedicated to JSON creation starting with
nr_segment_tree_finalise().
A test in test_segment.c was modified to check that the 'parentId'
is correctly set based on the inbound DT header.