feat: Always stream INP and remove standalone v1 spans#22517
Draft
logaretm wants to merge 5 commits into
Draft
Conversation
INP is now emitted through the v2 web vital span path regardless of the `traceLifecycle` option: streamed when span streaming is enabled and sent as a standalone span otherwise. This removes the last user of the v1 standalone web vital path (`startTrackingINP` / `startStandaloneWebVitalSpan`), which is deleted. Enrichment attributes (release, environment, user, replay/profile ids, client address) that the standalone span used to attach are preserved via a shared `getStandaloneWebVitalEnrichmentAttributes` helper.
Contributor
size-limit report 📦
|
INP is now always emitted as a v2 web vital span. With span streaming enabled it rides the streaming pipeline; with streaming disabled INP overrides the static trace lifecycle for itself and still streams (it would otherwise be dropped as a late child of the already-ended pageload span). INP was the last user of the standalone v1 span mechanism, so it is removed entirely: the `experimental.standalone` option, the `_isStandaloneSpan` handling and immediate self-send path in `SentrySpan`, the `createSpanEnvelope` wire format, the `SpanEnvelope`/`SpanItem` types, and their exports from `@sentry/core` and `@sentry/types`.
…ans and gen_ai extraction `createStreamedSpanEnvelope` and `extractGenAiSpansFromEvent` built the v2 `SpanContainerItem` (with the browser `ingest_settings`) identically. Extract a shared `createSpanContainerItem` helper and use it in both.
…moval - Delete the browser integration suites that exercised the removed `experimental.standalone` startSpan feature (they imported the removed `SpanEnvelope` type, breaking lint:types). - Update the react-17 / react-router-6 / react-router-7-spa / react-router-8-spa E2E INP assertions to the v2 streamed-span shape (INP now streams even under the static trace lifecycle).
…Buffer Sending INP through `SpanBuffer` pulled the buffer and its size-estimation code into every tracing bundle (previously only shipped when span streaming was opted into). INP is a single span per interaction, so send it directly with `captureSpan` + `createStreamedSpanEnvelope` instead, avoiding the buffer. Exports `createStreamedSpanEnvelope` from `@sentry/core` for this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
INP is now always emitted as a v2 web vital span. With span streaming enabled it rides the streaming pipeline as before. With span streaming disabled (
traceLifecycle: 'static') INP overrides the static lifecycle for itself and still streams, because it reports late and would otherwise be dropped as a late child with nothing to carry it.The bundle size increase is due to the bytes that now have to live in core without being tree-shaken which re-uses some of the stuff gen_ai uses to send out independent v2 spans.