-
Notifications
You must be signed in to change notification settings - Fork 155
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: Host Scopes not being removed #2624
Conversation
src/DDTrace/ScopeManager.php
Outdated
@@ -82,6 +82,8 @@ public function deactivate(Scope $scope) | |||
if ($span instanceof Span && ObjectKVStore::get($span->internalSpan, 'ddtrace_scope_activated') !== null) { | |||
ObjectKVStore::put($span->internalSpan, 'ddtrace_scope_activated', false); | |||
} | |||
|
|||
array_splice($this->hostRootScopes, array_search($scope, $this->hostRootScopes, true), 1); |
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.
Erratum: I may have to check for the index; will do it later as soon as I can
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2624 +/- ##
============================================
+ Coverage 77.64% 79.25% +1.60%
- Complexity 2226 2229 +3
============================================
Files 226 200 -26
Lines 25942 21949 -3993
Branches 986 0 -986
============================================
- Hits 20142 17395 -2747
+ Misses 5274 4554 -720
+ Partials 526 0 -526
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 27 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
BenchmarksBenchmark execution time: 2024-04-15 18:22:40 Comparing candidate commit 840fcf6 in PR branch Found 6 performance improvements and 1 performance regressions! Performance is the same for 171 metrics, 0 unstable metrics. scenario:ContextPropagationBench/benchInject64Bit
scenario:PDOBench/benchPDOBaseline
scenario:PDOBench/benchPDOOverhead
scenario:PDOBench/benchPDOOverheadWithDBM
scenario:SamplingRuleMatchingBench/benchRegexMatching1
scenario:SamplingRuleMatchingBench/benchRegexMatching2
scenario:TraceSerializationBench/benchSerializeTrace
|
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.
Ah, interesting. This is indeed suspicious.
Nice catch. Thanks!
close Root Scopes on Flush
Description
May address #2592
Using the reproducer added as a test, the host scopes would keep on growing, hence slowly but surely increasing memory usage
Reviewer checklist