MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / addEventSync

Function addEventSync

packages/replay-internal/src/util/addEvent.ts:21–31  ·  view source on GitHub ↗
(replay: ReplayContainer, event: RecordingEvent, isCheckout?: boolean)

Source from the content-addressed store, hash-verified

19 * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.
20 */
21export function addEventSync(replay: ReplayContainer, event: RecordingEvent, isCheckout?: boolean): boolean {
22 if (!shouldAddEvent(replay, event)) {
23 return false;
24 }
25
26 // This should never reject
27 // eslint-disable-next-line @typescript-eslint/no-floating-promises
28 _addEvent(replay, event, isCheckout);
29
30 return true;
31}
32
33/**
34 * Add an event to the event buffer.

Callers 3

throttledAddEventMethod · 0.90
getHandleRecordingEmitFunction · 0.90
addSettingsEventFunction · 0.90

Calls 2

shouldAddEventFunction · 0.85
_addEventFunction · 0.85

Tested by

no test coverage detected