feat(sdk-node): always set up propagation and context manager#5930
Merged
pichlermarc merged 11 commits intoopen-telemetry:mainfrom Oct 9, 2025
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5930 +/- ##
=======================================
Coverage 95.24% 95.24%
=======================================
Files 315 315
Lines 8604 8626 +22
Branches 1798 1801 +3
=======================================
+ Hits 8195 8216 +21
- Misses 409 410 +1
🚀 New features to boost your workflow:
|
pichlermarc
commented
Sep 12, 2025
|
|
||
| describe('setup exporter from env', () => { | ||
| let stubLoggerError: Sinon.SinonStub; | ||
| describe('setup exporter from env', () => { |
Member
Author
There was a problem hiding this comment.
Note: these are not new, I moved these into the above describe block, these tests seemed to be out of place unintentionally. Sorry for the excessive diff.
david-luna
reviewed
Oct 8, 2025
david-luna
reviewed
Oct 8, 2025
Contributor
david-luna
left a comment
There was a problem hiding this comment.
LGTM. I have a comment about registering context manager at the beginning of the start method.
Member
Author
nice! I hadn't thought of that 🙂 Addressed in 8d4b3c5 |
david-luna
approved these changes
Oct 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
This was discussed in a SIG meeting a long time ago. Makes a
ContextManagerand a defaultTextMapPropagatorbe registered always, not just when using the Trace SDK.Context management is the cornerstone of many OTel features, so it makes sense to also have it on by default in the OTel JS Node.js SDK. When it is missing it is a common source for confusion, I've seen:
traceIdattached to their logs that was created by a different service - this needs a propagator and context managerhttp.route(or it's modern replacement) not being on metrics when noContextManageris registered, since we need it to communicate from higher-level instrumentations to the lower-levelHttpInstrumentation. Missing http_route attribute on the http_server_duration metric when traces export is disabled #3862Once we have #5147, then there will also an expectation for a
ContextManagerto be registered for all metrics features to work, even when not using thehttpinstrumentation.Fixes #3862
Fixes #5640
(also this PR a way for me to find how many ways there are to misspell propagator)
Type of change
How Has This Been Tested?