Skip to content

feat(issue-details): Embed aggregated flame graphs for events with linked profile#103256

Merged
markushi merged 25 commits intomasterfrom
markushi/feat/embed-flamegraphs-for-anr-events-with-profile
Jan 26, 2026
Merged

feat(issue-details): Embed aggregated flame graphs for events with linked profile#103256
markushi merged 25 commits intomasterfrom
markushi/feat/embed-flamegraphs-for-anr-events-with-profile

Conversation

@markushi
Copy link
Member

@markushi markushi commented Nov 12, 2025

ANRs and App Hangs are noisy and hard to understand as the reported event stacktrace oftentimes points to the wrong root cause. What makes it way better to understand is seeing what happened while the app was unresponsive.

This PR adds a "ANR" / "App Hang" preview section. In a first step this feature is limited to mobile projects (based on project.platform) and events with a context.profiler.profiler_id set.

Profile Preview within Issue Details
image

Example Issue: https://sentry-sdks.sentry.io/issues/7020453025/events/ac211342cd634e068e1efa85fe0a4487/?project=5428559

https://linear.app/getsentry/project/anr-improvements-android-b906d182acee

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 12, 2025
@markushi
Copy link
Member Author

@sentry review

@markushi markushi changed the title [wip] feat(issue-details): Embed aggregated flame graphs for events with linked profile feat(issue-details): Embed aggregated flame graphs for events with linked profile Nov 26, 2025
@markushi markushi marked this pull request as ready for review November 26, 2025 16:52
@markushi markushi requested a review from a team as a code owner November 26, 2025 16:52
@codecov
Copy link

codecov bot commented Dec 18, 2025

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
12930 3 12927 10
View the top 3 failed test(s) by shortest run time
FlameGraphSection shows an error message when profiles fail to load
Stack Traces | 0.062s run time
Error: expect(element).toHaveAttribute("href", "https://docs.sentry..../platforms/javascript/profiling/") // element.getAttribute("href") === "https://docs.sentry..../platforms/javascript/profiling/"

Expected the element to have attribute:
  href="https://docs.sentry..../platforms/javascript/profiling/"
Received:
  href="https://docs.sentry..../platforms/android/profiling/"
    at Object.toHaveAttribute (.../views/issueDetails/flameGraphSection.spec.tsx:131:70)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1009:40)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at _runTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:494:12)
groupEventDetails ANR Root Cause renders App Hang profile section for iOS ANR events
Stack Traces | 1.04s run time
Error: Unable to find role="region" and name "App Hang Profile"

Ignored nodes: comments, script, style
...
    at waitForWrapper (.../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/wait-for.js:163:27)
    at .../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/query-helpers.js:86:33
    at Object.findByRole (.../issueDetails/groupEventDetails/groupEventDetails.spec.tsx:602:22)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1009:40)
    at _runTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:494:12)
groupEventDetails ANR Root Cause shows ANR profile section for Android ANR events
Stack Traces | 1.05s run time
Error: Unable to find role="region" and name "ANR Profile"

Ignored nodes: comments, script, style
...
    at waitForWrapper (.../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/wait-for.js:163:27)
    at .../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/query-helpers.js:86:33
    at Object.findByRole (.../issueDetails/groupEventDetails/groupEventDetails.spec.tsx:578:22)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1009:40)
    at runNextTicks (node:internal/process/task_queues:65:5)
    at processTimers (node:internal/timers:520:9)
    at _runTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:494:12)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@linear
Copy link

linear bot commented Jan 22, 2026

@vercel vercel bot requested a deployment to Preview January 22, 2026 14:13 Abandoned
@markushi markushi merged commit e74e9fb into master Jan 26, 2026
63 of 65 checks passed
@markushi markushi deleted the markushi/feat/embed-flamegraphs-for-anr-events-with-profile branch January 26, 2026 07:19
dashed pushed a commit that referenced this pull request Jan 26, 2026
…nked profiler_id (#103256)

ANRs and App Hangs are noisy and hard to understand as the reported
event stacktrace oftentimes points to the wrong root cause. What makes
it way better to understand is seeing what happened while the app was
unresponsive.

This PR adds a "ANR" / "App Hang" preview section. In a first step this
feature is limited to mobile projects (based on `project.platform`) and
events with a `context.profiler.profiler_id` set.

Profile Preview within Issue Details
<img width="1170" height="1054" alt="image"
src="https://github.com/user-attachments/assets/61c3bfeb-a43e-4af7-a23f-2a2dfb872b82"
/>

Example Issue:
https://sentry-sdks.sentry.io/issues/7020453025/events/ac211342cd634e068e1efa85fe0a4487/?project=5428559


https://linear.app/getsentry/project/anr-improvements-android-b906d182acee

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
dashed pushed a commit that referenced this pull request Jan 26, 2026
…nked profiler_id (#103256)

ANRs and App Hangs are noisy and hard to understand as the reported
event stacktrace oftentimes points to the wrong root cause. What makes
it way better to understand is seeing what happened while the app was
unresponsive.

This PR adds a "ANR" / "App Hang" preview section. In a first step this
feature is limited to mobile projects (based on `project.platform`) and
events with a `context.profiler.profiler_id` set.

Profile Preview within Issue Details
<img width="1170" height="1054" alt="image"
src="https://github.com/user-attachments/assets/61c3bfeb-a43e-4af7-a23f-2a2dfb872b82"
/>

Example Issue:
https://sentry-sdks.sentry.io/issues/7020453025/events/ac211342cd634e068e1efa85fe0a4487/?project=5428559


https://linear.app/getsentry/project/anr-improvements-android-b906d182acee

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
JonasBa pushed a commit that referenced this pull request Jan 27, 2026
…nked profiler_id (#103256)

ANRs and App Hangs are noisy and hard to understand as the reported
event stacktrace oftentimes points to the wrong root cause. What makes
it way better to understand is seeing what happened while the app was
unresponsive.

This PR adds a "ANR" / "App Hang" preview section. In a first step this
feature is limited to mobile projects (based on `project.platform`) and
events with a `context.profiler.profiler_id` set.

Profile Preview within Issue Details
<img width="1170" height="1054" alt="image"
src="https://github.com/user-attachments/assets/61c3bfeb-a43e-4af7-a23f-2a2dfb872b82"
/>

Example Issue:
https://sentry-sdks.sentry.io/issues/7020453025/events/ac211342cd634e068e1efa85fe0a4487/?project=5428559


https://linear.app/getsentry/project/anr-improvements-android-b906d182acee

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants