Dashboard › spotlight › Session 0e38UwDOcxN0
0e38UwDOcxN0LRckbExplore the Spotlight project at /home/byk/Code/getsentry/spotlight to understand the "AI view" feature. Be very thorough.
src/, packages/, or similar for anything related to "ai", "llm", "traces", "spans", "pipeline" viewsReport back with:
I'll thoroughly explore the Spotlight project to understand the AI view feature. Let me start with a broad search.
[tool results provided]
Good, I can see there's an aiTraces directory. Let me explore that and the broader structure.
[tool results provided]
Now let me read all the AI trace component files and the supporting SDK files.
[tool results provided]
Excellent. Now let me look at the types, constants, data hooks, store, and routing to understand the full data flow.
[tool results provided]
[tool results provided]
[tool results provided]
Now let me look at the trace details view and how AI mode integrates, the span tree component, and the store:
[tool results provided]
[tool results provided]
[tool results provided]
Now let me check the sidebar for AI-related navigation, and look at how the TraceList component handles the AI mode toggle:
[tool results provided]
Now let me check the SpanItem component and the SpanDetails to see how individual AI spans are rendered in the tree:
[tool results provided]
Let me look at the trace filtering hook (for AI filter), the store types, and the traces slice to understand how AI traces are stored/filtered:
[tool results provided]
Now let me look at the Badge UI component and the EmptyState component referenced in AI views, then check if there are any tests or demo data for the AI feature:
[tool results provided]
Let me also check the TraceTreeview component that shows in the left panel of the split view, and look at the duration utility:
[tool results provided]
I now have a comprehensive understanding of the AI view feature. Here is my complete report.
The AI view in Spotlight is a feature for inspecting LLM/AI SDK telemetry data captured via Sentry's tracing infrastructure. It surfaces two distinct surfaces:
Currently, the only supported AI SDK is the Vercel AI SDK (both v1 and v2 OpenTelemetry conventions), but the architecture is pluggable via a handler registry.
| File | Purpose |
|---|---|
| /home/byk/Code/getsentry/spotlight/packages/spotlight/src/ui/telemetry/components/insights/aiTraces/index.tsx | Router entry for the AI Traces insights tab |
| /home/byk/Code/getsentry/spotlight/packages/spotlight/src/ui/telemetry/components/insights/aiTraces/AITraceList.tsx | Sortable table listing all AI traces |
| /home/byk/Code/getsentry/spotlight/packages/spotlight/src/ui/telemetry/components/insights/aiTraces/AITraceItem.tsx | Single row in the AI traces table |
| /home/byk/Code/getsentry/spotlight/packages/spotlight/src/ui/telemetry/components/insights/aiTraces/AITraceDetails.tsx | Detail side-panel and embedded detail view (metadata, prompt, response, tool calls, span tree) |
| /home/byk/Code/getsentry/spotlight/packages/spotlight/src/ui/telemetry/components/insights/aiTraces/AITraceSplitView.tsx | Embedded AI detail view used when "AI Mode" is toggled on in the Traces tab |
| /home/byk/Code/getsentry/spotlight/packages/spotlight/src/ui/telemetry/components/insights/aiTraces/AITranscription.tsx | Chat-bubble conversation view of AI interactions within a trace |
| File | Purpose | |---|---| | ...