Commit 024cc857 authored by Yannick's avatar Yannick
Browse files

fix

parent 5d6b8f77
Pipeline #47951 failed with stages
in 17 minutes and 38 seconds
......@@ -119,7 +119,7 @@ def with_trace(label: str, span_kind=SpanKind.CLIENT):
if tracer is None:
return await target(*args, **kwargs)
with Context.current().tracer.span(name=label) as span:
with tracer.span(name=label) as span:
span.span_kind = span_kind
return await target(*args, **kwargs)
......@@ -127,11 +127,11 @@ def with_trace(label: str, span_kind=SpanKind.CLIENT):
@wraps(target)
def sync_inner(*args, **kwargs):
tracer = Context.current().tracer
tracer = get_or_create_ctx().tracer
if tracer is None:
return target(*args, **kwargs)
with Context.current().tracer.span(name=label) as span:
with tracer.span(name=label) as span:
span.span_kind = span_kind
return target(*args, **kwargs)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment