Skip to content

feat(issues): Render flamegraph attachments in issue details - #126461

Open
philprime wants to merge 6 commits into
masterfrom
philprime/feat/flamegraph-attachment-ui
Open

philprime wants to merge 6 commits into
masterfrom
philprime/feat/flamegraph-attachment-ui

Conversation

@philprime

@philprime philprime commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Adds a dedicated Flamegraph section to issue details when an event has a version-1 event.flamegraph attachment. It uses the existing attachment listing and download endpoints, with loading, explicit retry, and unsupported-format handling. The section is gated by event-attachments and flamegraph-attachments.

The viewer reuses the profiling canvas, theme, hover tooltips, and scrolling used by MetricKit flamegraphs without changing the existing MetricKit implementation. A separate adapter converts attachment nodes into weighted paths, preserving inclusive counts, samples ending at intermediate nodes, repeated frames, and recursion. Multiple attachments and call trees can be selected independently. Unclassified frames use the system-frame color.

Backend prerequisite: #126459. Land the backend first so the feature flag is exposed to the UI.

The 33 focused tests include the existing MetricKit and view-hierarchy suites. Full frontend typechecking and lint passed. Playwright verification against a local event attachment confirmed a painted canvas, independent tree counts, hover tooltips, scrolling, and collapse persistence. Diagnostic payloads and browser artifacts are not included.

Download version-1 flamegraph attachments and adapt their independent call trees to the existing

count-based profiling visualization. Keep MetricKit rendering unchanged and gate the new viewer

behind the flamegraph attachment feature flag.
@philprime philprime self-assigned this Oct 5, 2026
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-h890k304j.sentry.dev

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.74% 95.74% ±0%
Typed 142,248 142,323 🟢 +75
Untyped 6,331 6,335 🔴 +4
🔍 4 new type safety issues introduced

Non-null assertions (!) (3 new)

File Line Detail
static/app/components/events/flamegraphAttachment/index.tsx 34 data.trees[selectedTree]!
static/app/components/events/flamegraphAttachment/utils.ts 49 pending.pop()!
static/app/components/events/flamegraphAttachment/utils.ts 103 children[index]!

Type assertions (as) (1 new)

File Line Detail
static/app/components/events/flamegraphAttachment/utils.ts 91 as number[] — [] as number[]

This is informational only and does not block the PR.

@philprime
philprime marked this pull request as ready for review October 15, 2026 13:38
@philprime
philprime requested review from a team as code owners October 15, 2026 13:38

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit abc84f3. Configure here.

Comment thread static/app/components/events/eventFlamegraph.tsx
Comment thread static/app/components/events/flamegraphAttachment/utils.ts Outdated
Comment thread static/app/components/events/eventFlamegraph.spec.tsx Outdated
Comment thread static/app/components/events/eventFlamegraph.spec.tsx Outdated
Comment thread static/app/components/events/eventFlamegraph.spec.tsx Outdated
@linear-code

linear-code Bot commented Oct 16, 2026

Copy link
Copy Markdown

COCOA-2071

This branch was successfully deployed

1 active deployment
Preview — 89adc22a Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components State: Blocked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants