René's URL Explorer Experiment


Title: UI profiling: idle samples are attributed to stack 0 in convertToContinuousProfile · Issue #25757 · getsentry/sentry-javascript · GitHub

Open Graph Title: UI profiling: idle samples are attributed to stack 0 in convertToContinuousProfile · Issue #25757 · getsentry/sentry-javascript

X Title: UI profiling: idle samples are attributed to stack 0 in convertToContinuousProfile · Issue #25757 · getsentry/sentry-javascript

Description: Is there an existing issue for this? I searched the repo for "idle", "stackId" and "UI profiling" issues and found none. SDK and version @sentry/browser 10.76.2. The same code is on develop in packages/browser/src/profiling/utils.ts. Des...

Open Graph Description: Is there an existing issue for this? I searched the repo for "idle", "stackId" and "UI profiling" issues and found none. SDK and version @sentry/browser 10.76.2. The same code is on develop in pack...

X Description: Is there an existing issue for this? I searched the repo for "idle", "stackId" and "UI profiling" issues and found none. SDK and version @sentry/browser 10.76.2. The s...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/25757

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UI profiling: idle samples are attributed to stack 0 in convertToContinuousProfile","articleBody":"### Is there an existing issue for this?\n\nI searched the repo for \"idle\", \"stackId\" and \"UI profiling\" issues and found none.\n\n### SDK and version\n\n`@sentry/browser` 10.76.2. The same code is on `develop` in `packages/browser/src/profiling/utils.ts`.\n\n### Description\n\n`convertToContinuousProfile` writes a JS Self-Profiling sample that has no `stackId` as `stack_id: sample.stackId ?? 0`. A sample without a `stackId` means that the thread was idle. Stack 0 is a real stack: the first stack that the profiler recorded in the chunk. So the SDK reports every idle sample in the chunk as time spent in the frames of stack 0.\n\nThe legacy converter, `convertJSSelfProfileToSampledFormat`, handles the same case correctly. It adds one empty stack and points every idle sample at it.\n\n### Impact\n\nWith `profileLifecycle: 'trace'`, a root span often starts the profiler from inside a timer or event callback. Stack 0 is then rooted at the SDK's own `sentryWrapped` wrapper (`helpers.ts`), plus the callback that started the span. A parentless `http.client` root span that waits 2 s on the network then shows in the flame graph as about 2 s of main-thread time in `sentryWrapped`. In one of our production chunks, the wrapper frame was in 429 of 430 samples, and no other frame was in more than 1. Because of this, a third-party telemetry request looked as if it blocked the main thread.\n\n### Steps to reproduce\n\nWe found this by reading the code and checking production profiles. We did not run the steps below in isolation.\n\n1. Call `Sentry.init` with `browserProfilingIntegration()`, `profileLifecycle: 'trace'`, `profileSessionSampleRate: 1` and `tracesSampleRate: 1`. Use Chrome, and serve the page with `Document-Policy: js-profiling`.\n2. From a `setTimeout` callback, start a root span and keep it open for 2 s while the page is idle. For example, send an XHR to a slow endpoint while span streaming is on.\n3. Open the continuous profile for that window.\n\n### Expected result\n\nIdle samples have an empty stack, as in the legacy format. The flame graph shows the thread as idle.\n\n### Actual result\n\nIdle samples point to stack 0. The flame graph shows the callback's stack as busy for the whole window.\n\n### Suggested fix\n\nDo what the legacy converter does. On the first idle sample, add one empty stack, and point every idle sample at its index instead of at `0`.\n","author":{"url":"https://github.com/igor-goldny","@type":"Person","name":"igor-goldny"},"datePublished":"2026-10-27T11:37:45Z","url":"https://github.com/getsentry/sentry-javascript/issues/25757"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:35d4f2c0-db76-7223-f7a7-b0ddeb142379
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC5BC:C24D0:273E5C:36D7C8:6B047453
html-safe-nonce8e68b026f9e8158f175fa2ff064e2cba30db0c04c02ed4bbaced69cade32691a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUJDOkMyNEQwOjI3M0U1QzozNkQ3Qzg6NkIwNDc0NTMiLCJ2aXNpdG9yX2lkIjoiNjQ2NjM5NTAxOTEwMzQ2NjU4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4d8a98026f1a0adea3f627d3526e1ac54a31cfff5f3c9b88fa4f90f48038442d
hovercard-subject-tagissue:6058422333
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/25757/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5e41d27cd577e48268eaf02427d0a7e253ff3f439daa91aa8dc2b86831a40197/getsentry/sentry-javascript/issues/25757
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5e41d27cd577e48268eaf02427d0a7e253ff3f439daa91aa8dc2b86831a40197/getsentry/sentry-javascript/issues/25757
og:image:altIs there an existing issue for this? I searched the repo for "idle", "stackId" and "UI profiling" issues and found none. SDK and version @sentry/browser 10.76.2. The same code is on develop in pack...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameigor-goldny
hostnamegithub.com
expected-hostnamegithub.com
Noneae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecfb5f24c6e01d85f70804652a5107e5cac03a161
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/25757#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F25757
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F25757
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/25757
Reloadhttps://github.com/getsentry/sentry-javascript/issues/25757
Reloadhttps://github.com/getsentry/sentry-javascript/issues/25757
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests53 (53)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/25757
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/25757
#25764https://github.com/getsentry/sentry-javascript/pull/25764
UI profiling: idle samples are attributed to stack 0 in convertToContinuousProfilehttps://github.com/getsentry/sentry-javascript/issues/25757#top
#25764https://github.com/getsentry/sentry-javascript/pull/25764
https://github.com/msonnb
Browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Browser%22
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
https://github.com/igor-goldny
igor-goldnyhttps://github.com/igor-goldny
on Oct 27, 2026https://github.com/getsentry/sentry-javascript/issues/25757#issue-6058422333
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Oct 27, 2026https://github.com/getsentry/sentry-javascript/issues/25757#issuecomment-6440938975
Linear Codehttps://linear.app
JS-4007https://linear.app/getsentry/issue/JS-4007
linear-codehttps://github.com/apps/linear-code
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Browser%22
on Oct 27, 2026https://github.com/getsentry/sentry-javascript/issues/25757#event-34360755840
msonnbhttps://github.com/msonnb
on Oct 27, 2026https://github.com/getsentry/sentry-javascript/issues/25757#event-34364290411
msonnbhttps://github.com/msonnb
on Oct 28, 2026https://github.com/getsentry/sentry-javascript/issues/25757#event-34455209869
fix(browser): Preserve empty stacks in continuous profiles (#25764)https://github.com/getsentry/sentry-javascript/commit/7def1fe00e611990666546ee21468bc282292cf3
#25764https://github.com/getsentry/sentry-javascript/pull/25764
https://docs.github.com/articles/closing-issues-via-commit-messages
7def1fehttps://github.com/getsentry/sentry-javascript/commit/7def1fe00e611990666546ee21468bc282292cf3
msonnbhttps://github.com/msonnb
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#25764https://github.com/getsentry/sentry-javascript/pull/25764
on Oct 28, 2026https://github.com/getsentry/sentry-javascript/issues/25757#event-34455209970
https://github.com/msonnb
msonnbhttps://github.com/msonnb
on Oct 28, 2026https://github.com/getsentry/sentry-javascript/issues/25757#issuecomment-6465774089
upgrade to v11 of the SDKhttps://docs.sentry.io/platforms/javascript/migration/v10-to-v11/
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Oct 28, 2026https://github.com/getsentry/sentry-javascript/issues/25757#issuecomment-6474398254
GitHub Actionshttps://help.github.com/en/actions
#25764https://github.com/getsentry/sentry-javascript/pull/25764
11.10.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/11.10.0
https://github.com/igor-goldny
igor-goldnyhttps://github.com/igor-goldny
on Nov 2, 2026https://github.com/getsentry/sentry-javascript/issues/25757#issuecomment-6573784879
sentry-juniorhttps://github.com/apps/sentry-junior
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Nov 5, 2026https://github.com/getsentry/sentry-javascript/issues/25757#event-35225414984
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/25757
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/25757
msonnbhttps://github.com/msonnb
Browserhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Browser%22
Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Bug%22
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.