Skip to content

ref(browser): send INP as span v2 envelope#21220

Draft
logaretm wants to merge 1 commit into
awad/js-2628-deprecate-web-vitals-experiment-spansfrom
awad/js-2628-drop-v1-web-vital-spans
Draft

ref(browser): send INP as span v2 envelope#21220
logaretm wants to merge 1 commit into
awad/js-2628-deprecate-web-vitals-experiment-spansfrom
awad/js-2628-drop-v1-web-vital-spans

Conversation

@logaretm
Copy link
Copy Markdown
Member

@logaretm logaretm commented May 28, 2026

Sends INP spans as v2 spans exclusively without a fallback path, this allows us to completely drop standalone v1 span implementation.

This is meant as a breaking change.

@logaretm logaretm requested a review from a team as a code owner May 28, 2026 16:45
@logaretm logaretm requested review from Lms24 and mydea and removed request for a team May 28, 2026 16:45
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 28, 2026

JS-2628

Copy link
Copy Markdown

@cursor cursor Bot left a 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.

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 3842126. Configure here.


if (typeof value === 'number') {
return { type: Number.isInteger(value) ? 'integer' : 'double', value };
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicated serialization diverges from core NaN handling

Low Severity

The new serializeSpanAttributeValue reimplements the core's getTypedAttributeValue (in attributes.ts) but omits the !Number.isNaN(value) guard. The core explicitly drops NaN numbers, while this code would produce { type: 'double', value: NaN }, which JSON-serializes to null. The broader streamedSpanJsonToSerializedSpan and serializeSpanAttributes functions also duplicate existing core utilities (spanUtils.ts and attributes.ts) with further divergences: the unit property from attribute objects is dropped, and links aren't serialized. Maintaining two parallel serialization paths risks inconsistencies when the core version is updated.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 3842126. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.16 kB added added
@sentry/browser - with treeshaking flags 25.61 kB added added
@sentry/browser (incl. Tracing) 45.83 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 46.72 kB added added
@sentry/browser (incl. Tracing, Profiling) 50.66 kB added added
@sentry/browser (incl. Tracing, Replay) 85.14 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 74.83 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 89.87 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 102.51 kB added added
@sentry/browser (incl. Feedback) 44.33 kB added added
@sentry/browser (incl. sendFeedback) 31.98 kB added added
@sentry/browser (incl. FeedbackAsync) 37.07 kB added added
@sentry/browser (incl. Metrics) 28.24 kB added added
@sentry/browser (incl. Logs) 28.48 kB added added
@sentry/browser (incl. Metrics & Logs) 29.18 kB added added
@sentry/react 28.98 kB added added
@sentry/react (incl. Tracing) 48.12 kB added added
@sentry/vue 32.2 kB added added
@sentry/vue (incl. Tracing) 47.72 kB added added
@sentry/svelte 27.18 kB added added
CDN Bundle 29.54 kB added added
CDN Bundle (incl. Tracing) 47.15 kB added added
CDN Bundle (incl. Logs, Metrics) 31.04 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 48.43 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 70.3 kB added added
CDN Bundle (incl. Tracing, Replay) 84.58 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 85.8 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 90.37 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 91.59 kB added added
CDN Bundle - uncompressed 87.58 kB added added
CDN Bundle (incl. Tracing) - uncompressed 141 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 92.06 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 144.76 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 216.79 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 259.7 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 263.44 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 273.4 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 277.13 kB added added
@sentry/nextjs (client) 50.58 kB added added
@sentry/sveltekit (client) 46.24 kB added added
@sentry/core/server 75.95 kB added added
@sentry/core/browser 63.12 kB added added
@sentry/node-core 61.96 kB added added
@sentry/node 130.39 kB added added
@sentry/node - without tracing 74.36 kB added added
@sentry/aws-serverless 86.57 kB added added
@sentry/cloudflare (withSentry) - minified 171.5 kB added added
@sentry/cloudflare (withSentry) 429.29 kB added added

@logaretm logaretm marked this pull request as draft May 28, 2026 19:19
@logaretm logaretm removed request for Lms24 and mydea May 28, 2026 19:19
@logaretm logaretm modified the milestones: v11, 11.0.0 May 28, 2026
@logaretm logaretm force-pushed the awad/js-2628-drop-v1-web-vital-spans branch 6 times, most recently from 366b21d to 886135a Compare May 29, 2026 12:39
Co-Authored-By: Codex <codex@openai.com>
@logaretm logaretm force-pushed the awad/js-2628-drop-v1-web-vital-spans branch from 886135a to f7159a9 Compare May 29, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant