Skip to content

refactor: Added check to only set a FakeSpan if transaction.agent.otelSpanKey exists #3071

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 2 commits into from
May 1, 2025

Conversation

bizob2828
Copy link
Member

Description

This is defensive code to prevent obscuring errors. We have found that if you have an uncaught exception, it tries to enter the segment with a null value. If the otel bridge is enabled this crashes becaue of some assumptions in the context that transaction always exists when entering a segment.

Copy link

codecov bot commented May 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.59%. Comparing base (3cfb082) to head (3c6610a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3071      +/-   ##
==========================================
+ Coverage   89.35%   97.59%   +8.23%     
==========================================
  Files         334      335       +1     
  Lines       50468    50487      +19     
==========================================
+ Hits        45096    49271    +4175     
+ Misses       5372     1216    -4156     
Flag Coverage Δ
integration-tests-cjs-18.x 73.73% <100.00%> (+<0.01%) ⬆️
integration-tests-cjs-20.x 73.72% <100.00%> (?)
integration-tests-cjs-22.x 73.75% <100.00%> (?)
integration-tests-esm-18.x 49.80% <0.00%> (?)
integration-tests-esm-20.x 49.81% <0.00%> (-0.01%) ⬇️
integration-tests-esm-22.x 49.87% <0.00%> (-0.01%) ⬇️
unit-tests-18.x 89.18% <100.00%> (?)
unit-tests-20.x 89.18% <100.00%> (?)
unit-tests-22.x 89.18% <100.00%> (?)
versioned-tests-18.x 80.25% <100.00%> (-0.18%) ⬇️
versioned-tests-20.x 80.26% <100.00%> (-0.18%) ⬇️
versioned-tests-22.x 80.26% <100.00%> (-0.18%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bizob2828 bizob2828 merged commit b0c1ac1 into newrelic:main May 1, 2025
27 checks passed
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done: Issues recently completed in Node.js Engineering Board May 1, 2025
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