-
Notifications
You must be signed in to change notification settings - Fork 795
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: lazy initialization of the gzip stream #2581
Conversation
|
Codecov Report
@@ Coverage Diff @@
## main #2581 +/- ##
=======================================
Coverage 93.00% 93.00%
=======================================
Files 138 138
Lines 5092 5092
Branches 1095 1095
=======================================
Hits 4736 4736
Misses 356 356 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add end()
to the shutdown method of the exporter as well. Can you please add a todo comment so we don't forget?
Please fix the conflicts |
Conflicts are fixed and I added the comment. I'm not sure how you do about the merge commit because I can't see any in the git log of the main branch, but perhaps you rebase everytime. |
All PRs are squashed when we merge. That's why they have to be up to date. Speaking of which, this PR is out of date so it needs to be updated in order to be mergeable. |
Re-running tests to see if failure is persistent. |
Looks like the error wasn't caused by this PR. Please update the branch so it can be merged. |
Please update the branch so this can be merged. I want to cut a release and I'd like this to be in it. |
I'm working on it now. |
Is the merge enough or should I do something else ? |
No thats fine as long as the tests pass |
Which problem is this PR solving?
A gzip stream is created by
opentelemetry-exporter-otlp-http
even when it's never used. Moreover, it's also never ended. It's particularly visible when using the testing framework Jest, that will complain about it with the following message :Jest has detected the following 1 open handle potentially keeping Jest from exiting: ZLIB
.Short description of the changes
Having a way to call
gzip.end()
would fix the issue, but I think it's first preferable to avoid creating the gzip stream in the first place.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I ran
npm test
in the root folder andexperimental
folder.Checklist:
- [ ] Unit tests have been added(not required IMHO)- [ ] Documentation has been updated(not required)