Skip to content

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

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

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.

@github-actions

github-actions Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.28 kB +0.16% +45 B 🔺
@sentry/browser - with treeshaking flags 27.55 kB +0.16% +43 B 🔺
@sentry/browser - with treeshaking flags tracing without tracing 27.44 kB +0.15% +40 B 🔺
@sentry/browser (incl. Tracing) 51.22 kB +0.14% +68 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 51.23 kB +0.12% +61 B 🔺
@sentry/browser (incl. Tracing, Profiling) 54.22 kB +0.08% +41 B 🔺
@sentry/browser (incl. Tracing, Replay) 90.85 kB +0.11% +91 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.94 kB +0.11% +82 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 95.53 kB +0.08% +67 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 108.51 kB +0.1% +99 B 🔺
@sentry/browser (incl. Feedback) 46.8 kB +0.08% +36 B 🔺
@sentry/browser (incl. sendFeedback) 34.35 kB +0.14% +48 B 🔺
@sentry/browser (incl. FeedbackAsync) 39.45 kB +0.1% +36 B 🔺
@sentry/browser (incl. Metrics) 30.29 kB +0.13% +38 B 🔺
@sentry/browser (incl. Logs) 30.56 kB +0.15% +45 B 🔺
@sentry/browser (incl. Metrics & Logs) 31.22 kB +0.13% +40 B 🔺
@sentry/react 31.12 kB +0.12% +35 B 🔺
@sentry/react (incl. Tracing) 53.59 kB +0.11% +55 B 🔺
@sentry/vue 36.78 kB +0.13% +47 B 🔺
@sentry/vue (incl. Tracing) 53.75 kB +0.1% +51 B 🔺
@sentry/svelte 29.31 kB +0.16% +45 B 🔺
CDN Bundle 31.05 kB +0.11% +33 B 🔺
CDN Bundle (incl. Tracing) 51.82 kB +0.09% +44 B 🔺
CDN Bundle (incl. Logs, Metrics) 33.31 kB +0.07% +23 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 53.81 kB +0.13% +67 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 74.12 kB +0.17% +121 B 🔺
CDN Bundle (incl. Tracing, Replay) 89.46 kB +0.11% +93 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.41 kB +0.09% +80 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 95.59 kB +0.07% +65 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.57 kB +0.08% +71 B 🔺
CDN Bundle - uncompressed 91.72 kB +0.07% +59 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 154.12 kB +0.06% +88 B 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 98.31 kB +0.08% +74 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 160.07 kB +0.06% +88 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 228.05 kB +0.11% +248 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 274.03 kB +0.1% +272 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.97 kB +0.1% +272 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.74 kB +0.1% +272 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.66 kB +0.1% +272 B 🔺
@sentry/nextjs (client) 55.84 kB +0.11% +57 B 🔺
@sentry/sveltekit (client) 51.64 kB +0.08% +41 B 🔺
@sentry/core/server 40.03 kB +0.11% +41 B 🔺
@sentry/core/browser 13.66 kB +0.25% +33 B 🔺
@sentry/node 141.94 kB +0.05% +59 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.92 kB +0.05% +41 B 🔺
@sentry/node - without tracing 90.94 kB +0.07% +58 B 🔺
@sentry/node - without channel injection 120.33 kB +0.06% +66 B 🔺
@sentry/aws-serverless 99.2 kB +0.07% +61 B 🔺
@sentry/cloudflare (withSentry) - minified 206.69 kB +0.04% +78 B 🔺
@sentry/cloudflare (withSentry) 514.37 kB +0.07% +350 B 🔺

View base workflow run

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you apply the label PR: no-auto-close I will leave it alone ... forever!

… 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>
@Lms24
Lms24 force-pushed the lms/fix-browser-live-performance-time-origin branch from 25c1b28 to fd7ccbb Compare September 28, 2026 13:10
@Lms24
Lms24 force-pushed the lms/fix-replay-stamp-time-origin-at-observation branch from 8ca3d61 to 16b3d5e Compare September 28, 2026 13:10
@Lms24
Lms24 removed this pull request from stack #23069 September 28, 2026 14:25
@Lms24 Lms24 closed this Sep 28, 2026
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