Skip to content
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

[fix][test] Fix memory leak via OTel shutdown hooks in tests #23483

Merged

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Oct 18, 2024

Motivation

OTel AutoConfiguredOpenTelemetrySdkBuilder will register a shutdown hook by default. This will cause a memory leak since there will be a reference to all OpenTelemetrySdk instances until the test JVM completes running tests.

Modifications

Disable registering shutdown hook in tests.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.35%. Comparing base (bbc6224) to head (7b59001).
Report is 691 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23483      +/-   ##
============================================
+ Coverage     73.57%   74.35%   +0.77%     
- Complexity    32624    34405    +1781     
============================================
  Files          1877     1943      +66     
  Lines        139502   146973    +7471     
  Branches      15299    16191     +892     
============================================
+ Hits         102638   109275    +6637     
- Misses        28908    29273     +365     
- Partials       7956     8425     +469     
Flag Coverage Δ
inttests 27.28% <ø> (+2.69%) ⬆️
systests 24.42% <ø> (+0.10%) ⬆️
unittests 73.70% <ø> (+0.86%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 654 files with indirect coverage changes

@lhotari lhotari merged commit 2d88a4e into apache:master Oct 18, 2024
54 of 55 checks passed
lhotari added a commit that referenced this pull request Oct 21, 2024
lhotari added a commit that referenced this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants