feat: Always stream INP and remove standalone v1 spans#22517
Draft
logaretm wants to merge 3 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.
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.With INP moved over, it was the last user of the standalone v1 span mechanism, so this removes that mechanism entirely. Also dedupes the v2
SpanContainerItemconstruction thatcreateStreamedSpanEnvelopeand gen_ai span extraction had copied, into a sharedcreateSpanContainerItemhelper.