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

Prevent leaking TracerProvider in register_shutdown_function() #716

Conversation

Nevay
Copy link
Contributor

@Nevay Nevay commented Jun 17, 2022

Fix memory leak caused by keeping strong references to every created TracerProvider in callback provided to register_shutdown_function().

@codecov
Copy link

codecov bot commented Jun 17, 2022

Codecov Report

Merging #716 (6d66e0e) into main (a22f9f1) will decrease coverage by 0.37%.
The diff coverage is 12.50%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #716      +/-   ##
============================================
- Coverage     82.78%   82.41%   -0.38%     
- Complexity     1241     1247       +6     
============================================
  Files           139      139              
  Lines          3033     3048      +15     
============================================
+ Hits           2511     2512       +1     
- Misses          522      536      +14     
Flag Coverage Δ
7.4 82.40% <12.50%> (-0.38%) ⬇️
8.0 82.46% <12.50%> (-0.38%) ⬇️
8.1 82.46% <12.50%> (-0.38%) ⬇️

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

Impacted Files Coverage Δ
src/SDK/Trace/TracerProvider.php 72.54% <12.50%> (-27.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a22f9f1...6d66e0e. Read the comment docs.

@Nevay Nevay force-pushed the fix/tracer-register-shutdown-function-leaks-memory branch from c0bca40 to 6d66e0e Compare June 17, 2022 22:11
@brettmc brettmc merged commit 122aff0 into open-telemetry:main Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants