DashboardspotlightSession 0e38UwDOcxN0

Session 0e38UwDOcxN0

Full ID: 0e38UwDOcxN0LRckb
Messages: 26
Distillations: 0
Time range: 2026-05-19 18:53:18 — 2026-05-19 18:57:01

Conversation (26 messages)

Explore the Spotlight project at /home/byk/Code/getsentry/spotlight to understand the "AI view" feature. Be very thorough.

  1. Look for any AI-related views, components, or pages in the project
  2. Find the main UI components for the AI view — look in directories like src/, packages/, or similar for anything related to "ai", "llm", "traces", "spans", "pipeline" views
  3. Understand what data the AI view displays (tokens, costs, model info, latency, prompts, completions, etc.)
  4. Look at the component structure and how data flows
  5. Check for any span/trace visualization components

Report back with:

  • Exact file paths of the AI view components
  • What data/metrics are displayed
  • The component hierarchy and structure
  • Any interesting UI patterns or visualizations
  • Screenshots or descriptions of the layout if inferable from code
gateway · 2026-05-19 18:53:18

I'll thoroughly explore the Spotlight project to understand the AI view feature. Let me start with a broad search.

claude-opus-4-6 · 2026-05-19 18:53:18 · ~39 tokens

[tool results provided]

gateway · 2026-05-19 18:54:40

Good, I can see there's an aiTraces directory. Let me explore that and the broader structure.

claude-opus-4-6 · 2026-05-19 18:54:40 · ~33 tokens

[tool results provided]

gateway · 2026-05-19 18:54:47

Now let me read all the AI trace component files and the supporting SDK files.

claude-opus-4-6 · 2026-05-19 18:54:47 · ~27 tokens

[tool results provided]

gateway · 2026-05-19 18:54:53

Excellent. Now let me look at the types, constants, data hooks, store, and routing to understand the full data flow.

claude-opus-4-6 · 2026-05-19 18:54:53 · ~40 tokens

[tool results provided]

gateway · 2026-05-19 18:54:57

[tool results provided]

gateway · 2026-05-19 18:55:02

[tool results provided]

gateway · 2026-05-19 18:55:07

Now let me look at the trace details view and how AI mode integrates, the span tree component, and the store:

claude-opus-4-6 · 2026-05-19 18:55:07 · ~37 tokens

[tool results provided]

gateway · 2026-05-19 18:55:11

[tool results provided]

gateway · 2026-05-19 18:55:15

[tool results provided]

gateway · 2026-05-19 18:55:19

Now let me check the sidebar for AI-related navigation, and look at how the TraceList component handles the AI mode toggle:

claude-opus-4-6 · 2026-05-19 18:55:19 · ~43 tokens

[tool results provided]

gateway · 2026-05-19 18:55:24

Now let me check the SpanItem component and the SpanDetails to see how individual AI spans are rendered in the tree:

claude-opus-4-6 · 2026-05-19 18:55:24 · ~40 tokens

[tool results provided]

gateway · 2026-05-19 18:55:30

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:

claude-opus-4-6 · 2026-05-19 18:55:30 · ~49 tokens

[tool results provided]

gateway · 2026-05-19 18:55:38

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:

claude-opus-4-6 · 2026-05-19 18:55:38 · ~55 tokens

[tool results provided]

gateway · 2026-05-19 18:55:43

Let me also check the TraceTreeview component that shows in the left panel of the split view, and look at the duration utility:

claude-opus-4-6 · 2026-05-19 18:55:43 · ~43 tokens

[tool results provided]

gateway · 2026-05-19 18:57:01

I now have a comprehensive understanding of the AI view feature. Here is my complete report.


Spotlight "AI View" Feature -- Complete Analysis

1. Overview

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:

  1. A dedicated "AI Traces" page under Insights (sidebar: Insights > AI Traces)
  2. An "AI Mode" toggle within the Traces split-view for any trace that contains AI spans

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.


2. Exact File Paths of AI View Components

Core AI Components

| 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 |

SDK Handler Layer (Pluggable)

| File | Purpose | |---|---| | ...

claude-opus-4-6 · 2026-05-19 18:57:01 · ~4.4K tokens