File tree 2 files changed +9
-9
lines changed
sentry_sdk/integrations/opentelemetry
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
- from opentelemetry .context .context import Context # type: ignore
2
- from opentelemetry .context .contextvars_context import ContextVarsRuntimeContext # type: ignore
1
+ from opentelemetry .context .context import Context
2
+ from opentelemetry .context .contextvars_context import ContextVarsRuntimeContext
3
3
4
4
5
- class SentryContextVarsRuntimeContext (ContextVarsRuntimeContext ): # type: ignore
5
+ class SentryContextVarsRuntimeContext (ContextVarsRuntimeContext ):
6
6
def attach (self , context ):
7
7
# type: (Context) -> object
8
8
# TODO-neel-potel do scope management
Original file line number Diff line number Diff line change 1
- from opentelemetry .sdk .trace import SpanProcessor # type: ignore
2
- from opentelemetry .context import Context # type: ignore
3
- from opentelemetry .trace import Span # type: ignore
1
+ from opentelemetry .sdk .trace import SpanProcessor
2
+ from opentelemetry .context import Context
4
3
5
4
from sentry_sdk ._types import TYPE_CHECKING
6
5
7
6
if TYPE_CHECKING :
8
7
from typing import Optional
8
+ from opentelemetry .sdk .trace import ReadableSpan
9
9
10
10
11
- class PotelSentrySpanProcessor (SpanProcessor ): # type: ignore
11
+ class PotelSentrySpanProcessor (SpanProcessor ):
12
12
"""
13
13
Converts OTel spans into Sentry spans so they can be sent to the Sentry backend.
14
14
"""
@@ -25,11 +25,11 @@ def __init__(self):
25
25
pass
26
26
27
27
def on_start (self , span , parent_context = None ):
28
- # type: (Span , Optional[Context]) -> None
28
+ # type: (ReadableSpan , Optional[Context]) -> None
29
29
pass
30
30
31
31
def on_end (self , span ):
32
- # type: (Span ) -> None
32
+ # type: (ReadableSpan ) -> None
33
33
pass
34
34
35
35
# TODO-neel-potel not sure we need a clear like JS
You can’t perform that action at this time.
0 commit comments