@@ -32,7 +32,7 @@ def _capture_exception(exc):
3232
3333
3434def _get_start_span_function ():
35- # type: () -> Callable
35+ # type: () -> Callable[..., Any]
3636 current_span = sentry_sdk .get_current_span ()
3737 is_transaction = (
3838 current_span is not None and current_span .containing_transaction == current_span
@@ -41,7 +41,7 @@ def _get_start_span_function():
4141
4242
4343def _create_hook_wrapper (original_hook , sentry_hook ):
44- # type: (Callable, Callable) -> Callable
44+ # type: (Callable[..., Any], Callable[..., Any] ) -> Callable[..., Any]
4545 @wraps (original_hook )
4646 async def async_wrapper (* args , ** kwargs ):
4747 await sentry_hook (* args , ** kwargs )
@@ -86,7 +86,7 @@ def _wrap_hooks(hooks):
8686
8787
8888def _set_agent_data (span , agent ):
89- # type: (sentry_sdk.Span, agents.Agent) -> None
89+ # type: (sentry_sdk.tracing. Span, agents.Agent) -> None
9090 span .set_data (
9191 SPANDATA .GEN_AI_SYSTEM , "openai"
9292 ) # See footnote for https://opentelemetry.io/docs/specs/semconv/registry/attributes/gen-ai/#gen-ai-system for explanation why.
@@ -129,7 +129,7 @@ def _set_agent_data(span, agent):
129129
130130
131131def _set_usage_data (span , usage ):
132- # type: (sentry_sdk.Span, Usage) -> None
132+ # type: (sentry_sdk.tracing. Span, Usage) -> None
133133 span .set_data (SPANDATA .GEN_AI_USAGE_INPUT_TOKENS , usage .input_tokens )
134134 span .set_data (
135135 SPANDATA .GEN_AI_USAGE_INPUT_TOKENS_CACHED ,
@@ -144,7 +144,7 @@ def _set_usage_data(span, usage):
144144
145145
146146def _set_input_data (span , get_response_kwargs ):
147- # type: (sentry_sdk.Span, dict[str, Any]) -> None
147+ # type: (sentry_sdk.tracing. Span, dict[str, Any]) -> None
148148 if not should_send_default_pii ():
149149 return
150150
@@ -178,7 +178,7 @@ def _set_input_data(span, get_response_kwargs):
178178
179179
180180def _set_output_data (span , result ):
181- # type: (sentry_sdk.Span, Any) -> None
181+ # type: (sentry_sdk.tracing. Span, Any) -> None
182182 if not should_send_default_pii ():
183183 return
184184
0 commit comments