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: Fixed api.getTraceMetadata to handle when there is an active transaction but not active segment #2944

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

bizob2828
Copy link
Member

Description

A regression existed from the refactor of 12.11.0. A PR(#2943) was opened around a gap in test coveraege around this getTraceMetadata method. A customer had an active transaction but not segment. We assumed this could never happen, however this does happen at times due to context propagation breaking. This PR addresses this issue by handling of adding traceId and spanId separately. The customer experiencing this will still have invalid trace metadata(lacking a spanId) but that's a different issue.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.72%. Comparing base (b85111c) to head (950f58c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
api.js 72.72% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b85111c) and HEAD (950f58c). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (b85111c) HEAD (950f58c)
unit-tests-18.x 1 0
integration-tests-cjs-18.x 1 0
unit-tests-22.x 1 0
unit-tests-20.x 1 0
integration-tests-esm-18.x 1 0
integration-tests-cjs-20.x 1 0
integration-tests-esm-20.x 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2944      +/-   ##
==========================================
- Coverage   97.35%   88.72%   -8.63%     
==========================================
  Files         317      316       -1     
  Lines       48619    48610       -9     
==========================================
- Hits        47331    43131    -4200     
- Misses       1288     5479    +4191     
Flag Coverage Δ
integration-tests-cjs-18.x ?
integration-tests-cjs-20.x ?
integration-tests-cjs-22.x 72.57% <0.00%> (-0.01%) ⬇️
integration-tests-esm-18.x ?
integration-tests-esm-20.x ?
integration-tests-esm-22.x 50.00% <0.00%> (-0.01%) ⬇️
unit-tests-18.x ?
unit-tests-20.x ?
unit-tests-22.x ?
versioned-tests-18.x 79.51% <72.72%> (-0.16%) ⬇️
versioned-tests-20.x 79.49% <72.72%> (-0.19%) ⬇️
versioned-tests-22.x 79.50% <72.72%> (-0.19%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bizob2828 bizob2828 merged commit 6db3b4d into newrelic:main Feb 12, 2025
27 of 29 checks passed
@bizob2828 bizob2828 deleted the fix-get-trace-metadata branch February 12, 2025 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

2 participants