fix(otlp-exporter-base)!: split node and browser config types in two#5917
Merged
pichlermarc merged 6 commits intoopen-telemetry:mainfrom Sep 10, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5917 +/- ##
=======================================
Coverage 95.06% 95.07%
=======================================
Files 307 308 +1
Lines 8031 8039 +8
Branches 1627 1627
=======================================
+ Hits 7635 7643 +8
Misses 396 396
🚀 New features to boost your workflow:
|
maryliag
approved these changes
Sep 9, 2025
Member
Author
|
@maryliag thank you for taking a look. 🙂 Since you mentioned it here: I've been working on the follow-up test (#4744 like) in the background today - I just pushed them to this PR. You should be able to see them failing over at this draft #5919. The test itself is very simple (it only runs webpack and checks if the thing builds or not), but should help us catch regressions like this in the future. 🙂 |
Member
Author
|
I had planned the extra tests to be a follow-up but it turned out to be simpler than I thought. :) |
maryliag
approved these changes
Sep 9, 2025
Contributor
|
awesome! thank you for adding the test! 🚀 |
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?
See #5908, browser exporters are broken due to dynamic import of
node:httpin the defaults. What is happening is thatgetHttpConfigurationDefaults()is called, which uses thehttpAgentFactoryFromOptions()function to create an agent factory, which does not work in the browser.This PR fixes this, by introducing a new type
OtlpNodeHttpConfigurationalong with node-specific merge and default functions, that are based on the ones forOtlpHttpConfiguration. This is a breaking change as the name of the type changes, however it gives us more flexibility in the future to have these configurations diverge further without breaking one another.Related PR: #5719
Fixes #5908
Related #4744
Type of change
How Has This Been Tested?
examples/opentelemetry-webmain