fix(sdk-node): ensure invalid metric reader config does not throw on startup#6295
Merged
pichlermarc merged 4 commits intoopen-telemetry:mainfrom Jan 14, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6295 +/- ##
=======================================
Coverage 95.39% 95.39%
=======================================
Files 316 316
Lines 9548 9574 +26
Branches 2210 2216 +6
=======================================
+ Hits 9108 9133 +25
- Misses 440 441 +1
🚀 New features to boost your workflow:
|
maryliag
approved these changes
Jan 14, 2026
maryliag
pushed a commit
to maryliag/opentelemetry-js
that referenced
this pull request
Jan 15, 2026
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?
Our approach to environment vars is that they should not throw if set incorrectly, but instead gracefully handle it and fall back to defaults. This is backed by the specification:
This PR aligns the
NodeSDKsetup of thePeriodicExportingMetricReaderaccordingly:Not doing this currently causes the
PeriodicExportingMetricReaderto throw on startup ([1], [2], [3]) and crash the app, which can happen particularly often when just reducingOTEL_METRIC_EXPORT_INTERVALbelow30_000(30s).Fixes #5550 (see specifically #5550 (comment))
Type of change
How Has This Been Tested?