File tree Expand file tree Collapse file tree
featuremanagement/azuremonitor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020try :
2121 from opentelemetry .sdk ._logs import LoggingHandler
22- from opentelemetry .sdk .trace import SpanProcessor
22+ from opentelemetry .context .context import Context
23+ from opentelemetry .sdk .trace import Span , SpanProcessor
2324
2425 HAS_OPENTELEMETRY_LOGGING = True
2526except ImportError :
2627 HAS_OPENTELEMETRY_LOGGING = False
2728 LoggingHandler = object # type: ignore
2829 SpanProcessor = object # type: ignore
30+ Span = object # type: ignore
31+ Context = object # type: ignore
2932
3033
3134_EVENTS_LOGGER_INITIALIZED : bool = False
@@ -151,7 +154,7 @@ def __init__(self, **kwargs: Any) -> None:
151154 "targeting_context_accessor" , None
152155 )
153156
154- def on_start (self , span : Any , parent_context : Optional [Any ] = None ) -> None : # pylint: disable=unused-argument
157+ def on_start (self , span : Span , parent_context : Optional [Context ] = None ) -> None : # pylint: disable=unused-argument
155158 """
156159 Attaches the targeting ID to the span and baggage when a new span is started.
157160
You can’t perform that action at this time.
0 commit comments