Conversation
|
stvnkao
force-pushed
the
feat/record-error-metadata
branch
3 times, most recently
from
September 22, 2026 13:47
c1a7ec3 to
35e0e5d
Compare
## Why
`recordError` could not carry caller-supplied attributes, and `js_error_event`
sets `additionalProperties: false`, so extra keys cannot ride in the event
details. Event metadata is the channel built for this, and `EventCache` already
merges and sanitizes a per-call metadata argument for `recordEvent`. The
argument is named `metadata` rather than `eventDetails` because it populates
`RumEvent.metadata`, and "details" already names `RumEvent.details`.
## Scope
- `recordError(error, metadata?)` on slim's `Orchestration`. The behaviorally
identical `packages/web` override is deleted, so the full package inherits it.
- `Plugin.record` and `InternalPlugin.record` take a second
`metadata?: EventMetadata`, mirroring `RecordEvent`. An external plugin
implementing `record(data)` still satisfies it.
- `cwr('recordError', { error, metadata })`. The snippet forwards one payload, so
only an object literal with both own keys is read as an envelope. A CDN caller
who previously passed such a literal as the error is the one behavior change.
- `VirtualPageLoadTimer`'s private `record` becomes `recordEvent`, since a
non-generic `InternalPlugin.record` makes a private field of that name an
illegal override.
## Verification
763 unit tests and the `JsErrorPlugin` integ suite pass in chromium, including a
new case driving the CDN envelope end to end.
stvnkao
force-pushed
the
feat/record-error-metadata
branch
from
September 23, 2026 02:29
35e0e5d to
607c680
Compare
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.
recordErrorcould not carry caller-supplied attributes, andjs_error_eventsetsadditionalProperties: false, so extra keys cannot ride in the event details. Event metadata is the channel built for this, andEventCachealreadymerges and sanitizes a per-call metadata argument for
recordEvent. The argument is namedmetadatarather thaneventDetailsbecause it populatesRumEvent.metadata, and "details" already namesRumEvent.details.Scope
recordError(error, metadata?)on slim'sOrchestration. The behaviorallyidentical
packages/weboverride is deleted, so the full package inherits it.Plugin.recordandInternalPlugin.recordtake a secondmetadata?: EventMetadata, mirroringRecordEvent. An external pluginimplementing
record(data)still satisfies it.cwr('recordError', { error, metadata }). The snippet forwards one payload, soonly an object literal with both own keys is read as an envelope. A CDN caller
who previously passed such a literal as the error is the one behavior change.
VirtualPageLoadTimer's privaterecordbecomesrecordEvent, since anon-generic
InternalPlugin.recordmakes a private field of that name anillegal override.