mirror of
https://github.com/element-hq/synapse.git
synced 2026-10-23 19:33:44 +00:00
Onyl clear logcontext if spans should finish
This commit is contained in:
1 parent
70d0fd310a
commit
4e06a504c4
1 file changed
+3
-1
@@ -155,7 +155,9 @@ class _LogContextScope(Scope):
|
||||
if self._finish_on_close:
|
||||
self.span.finish()
|
||||
|
||||
self.logcontext.scope = None
|
||||
# The tracing scope/span should stick to the logcontext if it's active
|
||||
# so we only clear if we're finishing the span.
|
||||
self.logcontext.scope = None
|
||||
|
||||
if self._enter_logcontext:
|
||||
self.logcontext.__exit__(None, None, None)
|
||||
Reference in new issue
Block a user