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

Function addEvent

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

Source from the content-addressed store, hash-verified

37 * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.
38 */
39export function addEvent(
40 replay: ReplayContainer,
41 event: RecordingEvent,
42 isCheckout?: boolean,
43): Promise<AddEventResult | null> {
44 if (!shouldAddEvent(replay, event)) {
45 return Promise.resolve(null);
46 }
47
48 return _addEvent(replay, event, isCheckout);
49}
50
51async function _addEvent(
52 replay: ReplayContainer,

Callers 9

events.test.tsFile · 0.90
stop.test.tsFile · 0.90
session.test.tsFile · 0.90
addEvent.test.tsFile · 0.90
constructorMethod · 0.90

Calls 3

shouldAddEventFunction · 0.85
_addEventFunction · 0.85
resolveMethod · 0.65

Tested by

no test coverage detected