GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(browser): Report LCP and INP subparts on web vital spans by logaretm · Pull Request #25914 · getsentry/sentry-javascript

Conversation

@logaretm

@logaretm logaretm commented Oct 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

LCP and INP only reported a total, so there was no way to tell which phase made them slow, fixed by reporting their subparts on the web vital spans.

I added tests for image, text, prerendered and soft-nav LCPs, and for an INP whose slow handler runs on a later event of the interaction.

Here's what the spans look like with a 600ms image and a click handler that blocks for 300ms (trimmed to the web vital attributes, the new ones are the last three of each):

// ui.webvital.lcp
"browser.web_vital.lcp.value": { "value": 628, "type": "integer" },
"browser.web_vital.lcp.element": { "value": "body > img", "type": "string" },
"browser.web_vital.lcp.url": { "value": "http://localhost:3311/slow/sentry-logo-600x179.png", "type": "string" },
"browser.web_vital.lcp.load_time": { "value": 609, "type": "integer" },
"browser.web_vital.lcp.render_time": { "value": 628, "type": "integer" },
"browser.web_vital.lcp.size": { "value": 107400, "type": "integer" },
"browser.web_vital.lcp.resource_load_delay": { "value": 4.799999997019768, "type": "double" },
"browser.web_vital.lcp.resource_load_duration": { "value": 602, "type": "integer" },
"browser.web_vital.lcp.element_render_delay": { "value": 19.299999997019768, "type": "double" },

// ui.interaction.click
"browser.web_vital.inp.value": { "value": 320, "type": "integer" },
"browser.web_vital.inp.target": { "value": "body > button#slow", "type": "string" },
"browser.web_vital.inp.interaction_type": { "value": "click", "type": "string" },
"browser.web_vital.inp.input_delay": { "value": 0.09999999403953552, "type": "double" },
"browser.web_vital.inp.processing_duration": { "value": 300.90000000596046, "type": "double" },
"browser.web_vital.inp.presentation_delay": { "value": 19, "type": "integer" },

closes #25337

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions

github-actions Bot commented Oct 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 42f8208 (PR test merge using develop at d44a8ba)

Against: d44a8ba (develop) · base run #66610

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 30.18 kB - -
@sentry/browser - with treeshaking flags 28.37 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.28 kB - -
@sentry/browser (incl. Tracing) 53.25 kB +0.98% +515 B 🔺
@sentry/browser (incl. Tracing Core) 40.27 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.26 kB +0.97% +511 B 🔺
@sentry/browser (incl. Tracing, Profiling) 56.15 kB +0.95% +527 B 🔺
@sentry/browser (incl. Tracing, Replay) 93.29 kB +0.55% +502 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.18 kB +0.71% +574 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 97.67 kB +0.53% +510 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 111.22 kB +0.47% +513 B 🔺
@sentry/browser (incl. Feedback) 48.12 kB - -
@sentry/browser (incl. sendFeedback) 30.76 kB - -
@sentry/browser (incl. FeedbackAsync) 35.78 kB - -
@sentry/browser (incl. Metrics) 31.5 kB - -
@sentry/browser (incl. Logs) 31.78 kB - -
@sentry/browser (incl. Metrics & Logs) 32.44 kB - -
@sentry/react 32.19 kB - -
@sentry/react (incl. Tracing) 55.92 kB +0.96% +529 B 🔺
@sentry/vue 38.38 kB - -
@sentry/vue (incl. Tracing) 56.22 kB +0.95% +529 B 🔺
@sentry/svelte 30.19 kB - -
@sentry/remix (Remix 3 client bundle) 58.98 kB +1.02% +590 B 🔺
CDN Bundle 32.11 kB - -
CDN Bundle (incl. Tracing) 53.7 kB +1.04% +548 B 🔺
CDN Bundle (incl. Logs, Metrics) 34.89 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.27 kB +1% +555 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 75.92 kB - -
CDN Bundle (incl. Tracing, Replay) 91.56 kB +0.59% +529 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.17 kB +0.56% +521 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 97.02 kB +0.61% +579 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.54 kB +0.55% +539 B 🔺
CDN Bundle - uncompressed 93.8 kB - -
CDN Bundle (incl. Tracing) - uncompressed 158.84 kB +1.1% +1.72 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 102.13 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 166.47 kB +1.05% +1.72 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 232.25 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 279 kB +0.62% +1.72 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 286.62 kB +0.61% +1.72 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 290.93 kB +0.6% +1.72 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 298.54 kB +0.58% +1.72 kB 🔺
@sentry/nextjs (client) 59.58 kB +0.96% +561 B 🔺
@sentry/sveltekit (client) 54.59 kB +1.05% +566 B 🔺
@sentry/core/server 45.04 kB - -
@sentry/core/browser 14.4 kB - -
@sentry/node 152.01 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.34 kB - -
@sentry/node - without tracing 88.67 kB -0.01% -3 B 🔽
@sentry/node - without channel injection 140.94 kB -0.01% -6 B 🔽
@sentry/aws-serverless 99.04 kB -0.01% -2 B 🔽
@sentry/cloudflare (withSentry) - minified 206.95 kB - -
@sentry/cloudflare (withSentry) 480.37 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 232.31 kB - -

View base workflow run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Oct 29, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 27 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E nextjs-16-cacheComponents (cloudflare) Test (optional) Failing after 11m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E nextjs-14 (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 43s Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-orpc Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 55s Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (cloudflare, latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7-static Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E supabase-nextjs Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 38s Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 31s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 37s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-cloudflare Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 36s Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 35s Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 59s Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

One or more gzipped bundles increased by more than 500 bytes. If this increase is intentional, add the Accept Bundlesize Increase label to this PR to rerun and accept the check.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@logaretm logaretm added the Accept Bundlesize Increase label Oct 30, 2026
@logaretm
logaretm force-pushed the awad/web-vital-subparts branch from 18bc1bf to f692625 Compare November 13, 2026 09:57
@logaretm
logaretm marked this pull request as ready for review November 17, 2026 19:32
@javascript-sdk-gitflow
javascript-sdk-gitflow Bot requested review from Lms24, RulaKhaled and msonnb November 17, 2026 19:33
cursor[bot]
cursor Bot reviewed Nov 17, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/browser-utils/test/web-vitals/spans.test.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/browser-utils/src/web-vitals/interactionCache.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

logaretm added 5 commits November 17, 2026 14:58
@logaretm
feat(browser): Report LCP and INP subparts on web vital spans
219f4da
@logaretm
fix(browser): Merge INP subparts across every event of the interaction
c0c6825
@logaretm
fix(browser): Cap INP processing at the next paint
bcd2db9
@logaretm
ref(browser): Keep INP timings on the cached interaction context
b0530fc
@logaretm
ref(browser): Group INP subparts by frame with a shared interaction c…
3fa8675
…ache
@logaretm
logaretm force-pushed the awad/web-vital-subparts branch from f692625 to 3fa8675 Compare November 17, 2026 19:58
cursor[bot]
cursor Bot reviewed Nov 17, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

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.

There are 3 total unresolved issues (including 2 from previous reviews).

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 3fa8675. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/browser-utils/test/web-vitals/inp.test.ts
expect(getInpSubpartAttributes(pointerdown as any)).toEqual({
'browser.web_vital.inp.input_delay': 5,
'browser.web_vital.inp.processing_duration': 460,
'browser.web_vital.inp.presentation_delay': 55,

@cursor cursor Bot Nov 17, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Tests hard-code attribute name strings

Low Severity

New unit-test assertions for INP and LCP subparts use raw strings such as browser.web_vital.inp.input_delay and browser.web_vital.lcp.resource_load_delay. The matching integration tests already import the @sentry/conventions/attributes constants. Flagged because the review rules require those constants in test assertions on span attributes as well.

Additional Locations (2)
  • packages/browser-utils/test/web-vitals/spans.test.ts#L502-L507
  • packages/browser-utils/test/web-vitals/spans.test.ts#L540-L544
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 3fa8675. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Lms24
Lms24 reviewed Nov 19, 2026
View reviewed changes

@Lms24 Lms24 left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nice, I think this is valuable data! Before I ✅ , I had some questions on the interaction cache refactor. The LCP and INP attribute calculation looks correct to me!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/browser-utils/src/web-vitals/interactionCache.ts

@Lms24 Lms24 Nov 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

m/h: I'm wondering if we need this abstraction. I might be missing some context but based on the PR it seems like we added it because we added a second map to our INP instrumentation. Not yet saying we should fully scratch it but do you think this is better than rolling two separate maps? Just wondering if all the match, merge, etc logic is really necessary or if it would be easier for us to just keep this separate by accepting a bit of duplication. I might be wrong but I'm thinking that as long as we don't add a 3rd/4th/... map, we might get away with less bundle size by keeping things separate. WDYT?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@logaretm logaretm Nov 20, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sorry I should've documented this. I tried without the abstraction and with it, and the difference is around 10 bytes in favor of the separate version which I considered a wash.

size-limit entry shared cache (PR) two separate caches delta
@sentry/browser (incl. Tracing) 53,415 53,405 -10 B
@sentry/browser (incl. Tracing, Replay) 93,698 93,689 -9 B
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82,247 82,248 +1 B

most of the size comes from the calculation logic itself, not the abstraction. WDYT?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Lms24 Lms24 Nov 23, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

ah ok, then my calculation was off. yeah fine by me then, thx for checking!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/browser-utils/src/web-vitals/inp.ts
renderTime: number;
}

const INTERACTIONS = createInteractionCache<InteractionContext, PerformanceEventTiming>({

@Lms24 Lms24 Nov 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

m/q: I think this changes the eviction strategy of the interactions map. Previously we only kept the 10 most recent interaction entries, now we keep the 10 most recent and 10 longest ones. Is this on purpose? I think it might be more correct but wasn't fully sure if it's intended

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@logaretm logaretm Nov 20, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yep, this matches the attribution logic in the web vitals package. It also fixes a bug we had.

I think our logic drifted a while ago, we needed this to attribute the INP previously, but now (with soft navs) we only need it for element names. INP is sent when the user leaves the page, it should report the slowest interaction for that page. By only keeping the most recent ones, we would drop the element names for the slowest interactions.

I think this is partly why we still had those <unknown>s in our dashboard.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Lms24 Lms24 Nov 23, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

makes sense, thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@logaretm
logaretm requested a review from Lms24 November 20, 2026 16:42
Lms24
Lms24 approved these changes Nov 23, 2026
View reviewed changes
@logaretm
logaretm merged commit f2c00e2 into develop Nov 23, 2026
325 of 326 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@logaretm
logaretm deleted the awad/web-vital-subparts branch November 23, 2026 15:56
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Nov 23, 2026
publish: getsentry/[email protected] getsentry/publish#10541
Closed
51 tasks done
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
Report LCP and INP subparts on web vital spans #25337
Closed
@MountainsCalling-me MountainsCalling-me mentioned this pull request Nov 25, 2026
@sentry/astro 11.17+: web-vitals is bundled into the client even with bundleSizeOptimizations.excludeTracing: true (+6.4 KB gzip per page) #26902
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Lms24 Lms24 Lms24 approved these changes
@msonnb msonnb Awaiting requested review from msonnb
@RulaKhaled RulaKhaled Awaiting requested review from RulaKhaled

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Accept Bundlesize Increase

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Report LCP and INP subparts on web vital spans

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@logaretm @Lms24
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.