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

fix(agent): Fixes 8T distributed traces #724

Merged
merged 3 commits into from
Sep 6, 2023
Merged

Conversation

mfulb
Copy link
Contributor

@mfulb mfulb commented Sep 1, 2023

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.

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.
@mfulb mfulb added this to the Upcoming release milestone Sep 1, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 1, 2023

Codecov Report

Merging #724 (d03c6b1) into dev (7d72a0b) will decrease coverage by 0.53%.
Report is 1 commits behind head on dev.
The diff coverage is 100.00%.

@@            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     
Flag Coverage Δ
agent-for-php-5.5 ?
agent-for-php-5.6 ?
agent-for-php-7.0 77.02% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.1 76.74% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.2 77.16% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.3 77.17% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.4 76.96% <100.00%> (+<0.01%) ⬆️
agent-for-php-8.0 77.05% <100.00%> (+<0.01%) ⬆️
agent-for-php-8.1 77.01% <100.00%> (+<0.01%) ⬆️
agent-for-php-8.2 76.78% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
axiom/nr_segment.c 97.59% <100.00%> (+<0.01%) ⬆️

... and 25 files with indirect coverage changes

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

@lavarou lavarou modified the milestones: Upcoming release, next-release Sep 5, 2023
@mfulb mfulb added bug Something isn't working ready for review labels Sep 5, 2023
@mfulb mfulb marked this pull request as ready for review September 5, 2023 20:27
Copy link
Contributor

@zsistla zsistla 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 finding and fixing.

@mfulb mfulb merged commit 5e28c0e into dev Sep 6, 2023
49 checks passed
@mfulb mfulb deleted the msf/dt-8t-parentspanid branch September 6, 2023 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants