Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use correct type for what start_as_current_span returns
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Jul 30, 2022
1 parent d848156 commit 070195a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion synapse/logging/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def set_fates(clotho, lachesis, atropos, father="Zues", mother="Themis"):
TYPE_CHECKING,
Any,
Callable,
ContextManager,
Dict,
Generator,
Iterable,
Expand Down Expand Up @@ -476,7 +477,7 @@ def start_active_span(
end_on_exit: bool = True,
# For testing only
tracer: Optional["opentelemetry.sdk.trace.TracerProvider"] = None,
) -> Iterator["opentelemetry.trace.span.Span"]:
) -> ContextManager["opentelemetry.trace.span.Span"]:
if opentelemetry is None:
return contextlib.nullcontext() # type: ignore[unreachable]

Expand Down

0 comments on commit 070195a

Please sign in to comment.