Closed dneuhaeuser-zalando closed 3 years ago
Merging #44 (8d178a7) into master (45699b0) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #44 +/- ##
=======================================
Coverage 98.36% 98.37%
=======================================
Files 9 9
Lines 368 370 +2
=======================================
+ Hits 362 364 +2
Misses 6 6
Impacted Files | Coverage Δ | |
---|---|---|
opentracing_utils/span.py | 100.00% <100.00%> (ø) |
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 45699b0...8d178a7. Read the comment docs.
:+1:
👍
@vetinari Would be great if we can test and publish this fix.
FYI We have patched opentracing_utils in one of our own applications and this is the impact:
@vetinari Could you take a look at this? We currently run a patched version and it would be nice to get rid of the patch.
👍
:+1:
:+1:
v0.20.1 has been released - https://pypi.org/project/opentracing-utils/
Thanks you for following up on this.
Thank You! :)
inspect_span_from_stack
creates a reference cycle due to incorrect usage ofinspect.currentframe
(see the warning in the documentation https://docs.python.org/3/library/inspect.html#the-interpreter-stack).This issue is inherited by other functions that call it directly or indirectly. Here is a script that gives you some indication of the impact:
Output:
In real world applications we are observing 10k objects collected per minute, which leads to hundreds of GC collections per minute. This in turn has a significant impact on CPU usage and latency.
This PR changes
inspect_span_from_stack
so that it usesinspect.currentframe
in the way recommended by the Python documentation. It also adds a test to verify that this function doesn't create reference cycles.