-
Notifications
You must be signed in to change notification settings - Fork 806
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
feat: enable tree shaking #3329
Merged
Merged
Conversation
This file contains 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
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3329 +/- ##
==========================================
- Coverage 93.45% 93.07% -0.39%
==========================================
Files 241 226 -15
Lines 7260 6524 -736
Branches 1507 1360 -147
==========================================
- Hits 6785 6072 -713
+ Misses 475 452 -23
|
MSNev
approved these changes
Oct 14, 2022
vmarchaud
reviewed
Oct 15, 2022
experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json
Show resolved
Hide resolved
legendecas
approved these changes
Oct 17, 2022
@vmarchaud has your concern been resolved? |
Sorry i didn't see your answer |
Test failure appears to be #3344 |
vmarchaud
approved these changes
Oct 19, 2022
This was referenced Nov 1, 2022
2 tasks
6 tasks
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?
Fixes #2855
Original PR: #3087
This PR essentially re-opens #3087 to enable tree shaking for opentelemetry-js packages. This significantly reduces bundle size when using opentelemetry packages in the browser.
Short description of the changes
sideEffects: false
inpackage.json
for most packages to signal to bundlers like Webpack that the module can be tree shaken.sideEffects: false
should be a safe change here since none of the packages execute code without having a function called. The exception to this isopentelemetry-context-zone
which hassideEffects: true
because it importsZone.js
which presumably does have some side effects on import.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
package.json
& looking at a bundle analyzerChecklist: