File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
packages/service-library/src/servicelib Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2323}
2424
2525
26- TException = TypeVar ("TException" )
26+ TException = TypeVar ("TException" , bound = BaseException )
2727
2828_logger = logging .getLogger (__name__ )
2929
Original file line number Diff line number Diff line change 1+ from collections .abc import Iterator
12from contextlib import contextmanager
3+ from contextvars import Token
24from typing import TypeAlias
35
46from opentelemetry import context as otcontext
57from opentelemetry import trace
8+ from opentelemetry .context import Context
69from opentelemetry .instrumentation .logging import LoggingInstrumentor
710from settings_library .tracing import TracingSettings
811
@@ -22,8 +25,8 @@ def get_context() -> TracingContext:
2225
2326
2427@contextmanager
25- def use_tracing_context (context : TracingContext ):
26- token : object | None = None
28+ def use_tracing_context (context : TracingContext ) -> Iterator [ None ] :
29+ token : Token [ Context ] | None = None
2730 if context is not None :
2831 token = otcontext .attach (context )
2932 try :
You can’t perform that action at this time.
0 commit comments