Repository navigation
Conversation
This was referenced Nov 11, 2026
size-limit report 📦
|
jxiwang
marked this pull request as ready for review
November 11, 2026 21:16
Session Replay Browser E2E ResultsDetails
|
This branch has not been deployed
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.
Summary
amp-semantic/resource-errorfor failed image, stylesheet, script, and font loads, grouped over 500 ms with a compact count.Stack
Base: #2154. Merge after #2128 and #2150–#2154.
Validation
pnpm --filter @amplitude/amp-semantic... buildpnpm --filter @amplitude/session-replay-browser... buildpnpm --filter @amplitude/amp-semantic test: 149 passed, 100% coveragepnpm --filter @amplitude/session-replay-browser test: 1,183 passed, 100% coveragepnpm --filter @amplitude/amp-semantic test:playwright: 13 passedpnpm lint,pnpm lint:deps,pnpm test:examplesThe full workspace build stalls in the unchanged Segment Session Replay Rollup step, and the full workspace test run has two existing
analytics-react-nativefailures, as documented in earlier stack drafts.Linear: SRAI-82.
Note
Low Risk
Adds bounded DOM/font listeners with existing privacy helpers and no network patching; risk is mainly extra listener overhead and path templating correctness.
Overview
Adds a new
amp-semantic/resource-errorsemantic family that records failed image, stylesheet, script, and font loads (not runtime JS or CSS parse errors).A new
resourceErrorRecorderlistens for elementerrorevents anddocument.fontsloadingerror, batches matching failures for 500 ms, then emits compact payloads with resource type (rt), count, and optional sanitized path (no origin/query/fragment) plus privacy-safe container when the node is still connected and not blocked. Pending work flushes on pagehide or when the tab is hidden; the family can be turned off viafamilies: { 'resource-error': false }with a 200-event session cap.The recorder is wired into default recorders,
SEMANTIC_CAPS,schema.json, andSemanticPayloads. Coverage includes unit tests, a Playwright replay case for a failed image (query strings stripped from wire output), README/local inspector notes, and harness support for disabling the family.Reviewed by Cursor Bugbot for commit 6cdcfcf. Bugbot is set up for automated code reviews on this repo. Configure here.