Spotlight's AI Traces view (Insights → AI Traces) currently only supports the Vercel AI SDK. The gen_ai.* spans emitted by the sentry-python PydanticAIIntegration are not surfaced there because the library handler registry only contains vercelAISDKHandler, which requires a vercel.ai.operationId attribute that Python SDK spans don't set.
Current behavior
aiLibraries.ts registers [vercelAISDKHandler] only
- PydanticAI spans show up in the regular Traces tab but are invisible in the AI Traces view
PydanticAIIntegration (sentry-python) emits standard gen_ai.* ops with token counts, model info, and prompt/completion data
Gap
Users instrumenting Python backends with PydanticAIIntegration get no AI Traces visibility in Spotlight, even though the span data is present.
Options
- Add a dedicated
pydanticAIHandler to the aiLibraries registry that detects gen_ai.* spans from the Python SDK
- Alternatively, add a generic sentry-python
gen_ai handler that covers all Python AI integrations (Anthropic, OpenAI, PydanticAI) since they share the same span format
Spotlight's AI Traces view (Insights → AI Traces) currently only supports the Vercel AI SDK. The
gen_ai.*spans emitted by the sentry-pythonPydanticAIIntegrationare not surfaced there because the library handler registry only containsvercelAISDKHandler, which requires avercel.ai.operationIdattribute that Python SDK spans don't set.Current behavior
aiLibraries.tsregisters[vercelAISDKHandler]onlyPydanticAIIntegration(sentry-python) emits standardgen_ai.*ops with token counts, model info, and prompt/completion dataGap
Users instrumenting Python backends with
PydanticAIIntegrationget no AI Traces visibility in Spotlight, even though the span data is present.Options
pydanticAIHandlerto theaiLibrariesregistry that detectsgen_ai.*spans from the Python SDKgen_aihandler that covers all Python AI integrations (Anthropic, OpenAI, PydanticAI) since they share the same span format