Skip to content

fix(replay): Convert performance entries against the origin they were observed with - #23068

Draft
Lms24 wants to merge 1 commit into
lms/fix-browser-live-performance-time-originfrom
lms/fix-replay-stamp-time-origin-at-observation
Draft

fix(replay): Convert performance entries against the origin they were observed with#23068
Lms24 wants to merge 1 commit into
lms/fix-browser-live-performance-time-originfrom
lms/fix-replay-stamp-time-origin-at-observation

Conversation

@Lms24

@Lms24 Lms24 commented Aug 5, 2026

Copy link
Copy Markdown
Member

No description provided.

… observed with

Replay buffers raw `PerformanceEntry` objects and only converts them to wall
clock time on flush, which for a long-running session can happen minutes later
and across a clock drift correction. Converting them against the origin in
effect at flush time retroactively shifts every buffered entry by the drift,
including the ones that were timed correctly.

Stamps the current time origin onto each entry as it is observed and converts
against that stamp. The stamps live in a `WeakMap` so the buffer keeps holding
bare entries and its identity-based dedup is unaffected.

Web vitals already convert eagerly in their instrumentation handler, so they
keep using the current origin.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.17 kB added added
@sentry/browser - with treeshaking flags 28.36 kB added added
@sentry/browser (incl. Tracing) 47.58 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 47.6 kB added added
@sentry/browser (incl. Tracing, Profiling) 52.35 kB added added
@sentry/browser (incl. Tracing, Replay) 87.02 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.41 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 91.7 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 104.36 kB added added
@sentry/browser (incl. Feedback) 47.48 kB added added
@sentry/browser (incl. sendFeedback) 35 kB added added
@sentry/browser (incl. FeedbackAsync) 40.15 kB added added
@sentry/browser (incl. Metrics) 31.25 kB added added
@sentry/browser (incl. Logs) 31.47 kB added added
@sentry/browser (incl. Metrics & Logs) 32.15 kB added added
@sentry/react 31.97 kB added added
@sentry/react (incl. Tracing) 49.82 kB added added
@sentry/vue 35.26 kB added added
@sentry/vue (incl. Tracing) 49.55 kB added added
@sentry/svelte 30.19 kB added added
CDN Bundle 32.17 kB added added
CDN Bundle (incl. Tracing) 47.89 kB added added
CDN Bundle (incl. Logs, Metrics) 33.72 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.24 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 73.14 kB added added
CDN Bundle (incl. Tracing, Replay) 85.55 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.84 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.35 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.67 kB added added
CDN Bundle - uncompressed 95.37 kB added added
CDN Bundle (incl. Tracing) - uncompressed 142.9 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 100 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.88 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.88 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.34 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.3 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.04 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280 kB added added
@sentry/nextjs (client) 52.41 kB added added
@sentry/sveltekit (client) 48.04 kB added added
@sentry/core/server 65.62 kB added added
@sentry/core/browser 51.92 kB added added
@sentry/node 120.16 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 83.77 kB added added
@sentry/aws-serverless 92.28 kB added added
@sentry/cloudflare (withSentry) - minified 218.67 kB added added
@sentry/cloudflare (withSentry) 538.88 kB added added

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