Skip to content

feat(browser): Report the INP target and interaction type as attributes - #24573

Draft
logaretm wants to merge 1 commit into
developfrom
awad/inp-target-and-interaction-type
Draft

logaretm wants to merge 1 commit into
developfrom
awad/inp-target-and-interaction-type

Conversation

@logaretm

@logaretm logaretm commented Sep 21, 2026

Copy link
Copy Markdown
Member

The element and interaction type an INP was reported on only existed as the span's name and op, which always have a value and so mislabel an INP reported without an interaction as a click, fixed by reporting them as browser.web_vital.inp.target and browser.web_vital.inp.interaction_type, set only for what was actually observed.

I added unit tests for an unresolved element and for an INP without an entry, and the INP browser integration tests now expect both attributes.

Question for the review: should the "unknown" case be reported as <unknown> or as unknown without the brackets, or omit it entirely? I chose to omit it for now.

ref Conventions PR: getsentry/sentry-conventions#641

The element and the kind of interaction an INP was reported on only
existed as the span's name and op. Both always have a value, even for an
INP that web-vitals reports without an entry, which is named
"Interaction to next paint" and filed under `ui.interaction.click` to
stay within the interaction span family. Nothing reading the span can
tell that apart from a real click.

Report them as `browser.web_vital.inp.target` and
`browser.web_vital.inp.interaction_type`, set only for what was actually
observed. The keys are hardcoded until getsentry/sentry-conventions#641
is released.
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.07 kB - -
@sentry/browser - with treeshaking flags 27.34 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.24 kB - -
@sentry/browser (incl. Tracing) 50.6 kB +0.09% +41 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 50.62 kB +0.08% +40 B 🔺
@sentry/browser (incl. Tracing, Profiling) 53.62 kB +0.08% +40 B 🔺
@sentry/browser (incl. Tracing, Replay) 90.16 kB +0.05% +45 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.25 kB +0.06% +42 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 94.86 kB +0.05% +44 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 107.83 kB +0.05% +45 B 🔺
@sentry/browser (incl. Feedback) 46.6 kB - -
@sentry/browser (incl. sendFeedback) 34.13 kB - -
@sentry/browser (incl. FeedbackAsync) 39.25 kB - -
@sentry/browser (incl. Metrics) 30.08 kB - -
@sentry/browser (incl. Logs) 30.34 kB - -
@sentry/browser (incl. Metrics & Logs) 31 kB - -
@sentry/react 30.82 kB - -
@sentry/react (incl. Tracing) 52.92 kB +0.07% +36 B 🔺
@sentry/vue 36.33 kB - -
@sentry/vue (incl. Tracing) 52.91 kB +0.08% +42 B 🔺
@sentry/svelte 29.1 kB - -
CDN Bundle 30.77 kB - -
CDN Bundle (incl. Tracing) 51.13 kB +0.07% +32 B 🔺
CDN Bundle (incl. Logs, Metrics) 33.02 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.11 kB +0.08% +38 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.71 kB - -
CDN Bundle (incl. Tracing, Replay) 88.67 kB +0.04% +34 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 90.59 kB +0.05% +37 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 94.72 kB +0.06% +50 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 96.75 kB +0.06% +49 B 🔺
CDN Bundle - uncompressed 91.07 kB - -
CDN Bundle (incl. Tracing) - uncompressed 152.63 kB +0.08% +112 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.64 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 158.59 kB +0.08% +112 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.05 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 272.21 kB +0.05% +112 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 278.14 kB +0.05% +112 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 285.91 kB +0.04% +112 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 291.84 kB +0.04% +112 B 🔺
@sentry/nextjs (client) 55.26 kB +0.07% +38 B 🔺
@sentry/sveltekit (client) 51.05 kB +0.08% +36 B 🔺
@sentry/core/server 39.93 kB - -
@sentry/core/browser 13.63 kB - -
@sentry/node 133.37 kB +0.02% +19 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.15 kB - -
@sentry/node - without tracing 89.92 kB +0.03% +22 B 🔺
@sentry/node - without channel injection 112.16 kB +0.03% +23 B 🔺
@sentry/aws-serverless 98.19 kB +0.02% +18 B 🔺
@sentry/cloudflare (withSentry) - minified 204.67 kB - -
@sentry/cloudflare (withSentry) 509.34 kB - -

View base workflow run

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant