@sentry/replay 8.0.0-alpha.5 → 10.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -11
- package/README.md +8 -17
- package/build/npm/cjs/index.js +8390 -0
- package/build/npm/cjs/index.js.map +1 -0
- package/build/npm/cjs/worker-bundler.js +1 -0
- package/build/npm/esm/index.js +8387 -0
- package/build/npm/esm/index.js.map +1 -0
- package/build/npm/esm/package.json +1 -0
- package/build/npm/esm/worker-bundler.js +1 -0
- package/{types → build/npm/types}/constants.d.ts +3 -2
- package/build/npm/types/constants.d.ts.map +1 -0
- package/{types → build/npm/types}/coreHandlers/handleAfterSendEvent.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleAfterSendEvent.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleBeforeSendEvent.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleBeforeSendEvent.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleBreadcrumbs.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleBreadcrumbs.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleClick.d.ts +2 -2
- package/{types → build/npm/types}/coreHandlers/handleClick.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleDom.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleDom.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleGlobalEvent.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleGlobalEvent.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleHistory.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleHistory.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleKeyboardEvent.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleKeyboardEvent.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/handleNetworkBreadcrumbs.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/handleNetworkBreadcrumbs.d.ts.map +1 -1
- package/build/npm/types/coreHandlers/performanceObserver.d.ts.map +1 -0
- package/{types → build/npm/types}/coreHandlers/util/addBreadcrumbEvent.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/util/addBreadcrumbEvent.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/util/addFeedbackBreadcrumb.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/util/addFeedbackBreadcrumb.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/util/addNetworkBreadcrumb.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/util/domUtils.d.ts +1 -1
- package/{types → build/npm/types}/coreHandlers/util/domUtils.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/util/fetchUtils.d.ts +4 -3
- package/build/npm/types/coreHandlers/util/fetchUtils.d.ts.map +1 -0
- package/{types → build/npm/types}/coreHandlers/util/getAttributesToRecord.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/util/networkUtils.d.ts +2 -3
- package/build/npm/types/coreHandlers/util/networkUtils.d.ts.map +1 -0
- package/{types → build/npm/types}/coreHandlers/util/onWindowOpen.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/util/shouldSampleForBufferEvent.d.ts +2 -2
- package/{types → build/npm/types}/coreHandlers/util/shouldSampleForBufferEvent.d.ts.map +1 -1
- package/{types → build/npm/types}/coreHandlers/util/xhrUtils.d.ts +4 -3
- package/build/npm/types/coreHandlers/util/xhrUtils.d.ts.map +1 -0
- package/{types → build/npm/types}/eventBuffer/EventBufferArray.d.ts +2 -0
- package/build/npm/types/eventBuffer/EventBufferArray.d.ts.map +1 -0
- package/{types → build/npm/types}/eventBuffer/EventBufferCompressionWorker.d.ts +5 -3
- package/build/npm/types/eventBuffer/EventBufferCompressionWorker.d.ts.map +1 -0
- package/{types → build/npm/types}/eventBuffer/EventBufferProxy.d.ts +5 -1
- package/build/npm/types/eventBuffer/EventBufferProxy.d.ts.map +1 -0
- package/{types → build/npm/types}/eventBuffer/WorkerHandler.d.ts +3 -1
- package/build/npm/types/eventBuffer/WorkerHandler.d.ts.map +1 -0
- package/{types → build/npm/types}/eventBuffer/index.d.ts +2 -2
- package/build/npm/types/eventBuffer/index.d.ts.map +1 -0
- package/{types → build/npm/types}/integration.d.ts +26 -13
- package/build/npm/types/integration.d.ts.map +1 -0
- package/{types → build/npm/types}/replay.d.ts +32 -27
- package/build/npm/types/replay.d.ts.map +1 -0
- package/{types → build/npm/types}/session/Session.d.ts.map +1 -1
- package/build/npm/types/session/fetchSession.d.ts +6 -0
- package/build/npm/types/session/fetchSession.d.ts.map +1 -0
- package/{types → build/npm/types}/session/loadOrCreateSession.d.ts +1 -2
- package/build/npm/types/session/loadOrCreateSession.d.ts.map +1 -0
- package/{types → build/npm/types}/types/performance.d.ts +16 -4
- package/{types → build/npm/types}/types/performance.d.ts.map +1 -1
- package/{types → build/npm/types}/types/replay.d.ts +53 -42
- package/build/npm/types/types/replay.d.ts.map +1 -0
- package/{types → build/npm/types}/types/replayFrame.d.ts +14 -7
- package/build/npm/types/types/replayFrame.d.ts.map +1 -0
- package/{types → build/npm/types}/types/request.d.ts +1 -1
- package/build/npm/types/types/request.d.ts.map +1 -0
- package/{types-ts3.8 → build/npm/types}/types/rrweb.d.ts +64 -60
- package/{types → build/npm/types}/types/rrweb.d.ts.map +1 -1
- package/{types → build/npm/types}/util/addEvent.d.ts.map +1 -1
- package/{types → build/npm/types}/util/addGlobalListeners.d.ts.map +1 -1
- package/build/npm/types/util/createPerformanceEntries.d.ts +52 -0
- package/build/npm/types/util/createPerformanceEntries.d.ts.map +1 -0
- package/{types → build/npm/types}/util/createPerformanceSpans.d.ts.map +1 -1
- package/{types → build/npm/types}/util/createReplayEnvelope.d.ts +1 -1
- package/{types → build/npm/types}/util/createReplayEnvelope.d.ts.map +1 -1
- package/{types → build/npm/types}/util/debounce.d.ts.map +1 -1
- package/{types → build/npm/types}/util/eventUtils.d.ts +1 -1
- package/{types → build/npm/types}/util/eventUtils.d.ts.map +1 -1
- package/{types → build/npm/types}/util/getPrivacyOptions.d.ts +3 -3
- package/build/npm/types/util/getPrivacyOptions.d.ts.map +1 -0
- package/build/npm/types/util/getRecordingSamplingOptions.d.ts +10 -0
- package/build/npm/types/util/getRecordingSamplingOptions.d.ts.map +1 -0
- package/{types → build/npm/types}/util/handleRecordingEmit.d.ts +1 -0
- package/build/npm/types/util/handleRecordingEmit.d.ts.map +1 -0
- package/{types → build/npm/types}/util/isRrwebError.d.ts +1 -1
- package/{types → build/npm/types}/util/isRrwebError.d.ts.map +1 -1
- package/build/npm/types/util/logger.d.ts +24 -0
- package/build/npm/types/util/logger.d.ts.map +1 -0
- package/{types → build/npm/types}/util/maskAttribute.d.ts +2 -0
- package/{types → build/npm/types}/util/maskAttribute.d.ts.map +1 -1
- package/{types → build/npm/types}/util/prepareRecordingData.d.ts +1 -1
- package/{types → build/npm/types}/util/prepareRecordingData.d.ts.map +1 -1
- package/{types → build/npm/types}/util/prepareReplayEvent.d.ts +2 -5
- package/build/npm/types/util/prepareReplayEvent.d.ts.map +1 -0
- package/build/npm/types/util/resetReplayIdOnDynamicSamplingContext.d.ts +14 -0
- package/build/npm/types/util/resetReplayIdOnDynamicSamplingContext.d.ts.map +1 -0
- package/build/npm/types/util/rrweb.d.ts +7 -0
- package/build/npm/types/util/rrweb.d.ts.map +1 -0
- package/{types → build/npm/types}/util/sendReplay.d.ts.map +1 -1
- package/{types → build/npm/types}/util/sendReplayRequest.d.ts +8 -2
- package/build/npm/types/util/sendReplayRequest.d.ts.map +1 -0
- package/{types → build/npm/types}/util/shouldFilterRequest.d.ts.map +1 -1
- package/build/npm/types/worker-bundler.d.ts +2 -0
- package/build/npm/types/worker-bundler.d.ts.map +1 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/constants.d.ts +3 -2
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleAfterSendEvent.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleBeforeSendEvent.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleBreadcrumbs.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleClick.d.ts +2 -2
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleDom.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleGlobalEvent.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleHistory.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleKeyboardEvent.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/handleNetworkBreadcrumbs.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/addBreadcrumbEvent.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/addFeedbackBreadcrumb.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/domUtils.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/fetchUtils.d.ts +4 -3
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/networkUtils.d.ts +2 -6
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/shouldSampleForBufferEvent.d.ts +2 -2
- package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/xhrUtils.d.ts +4 -3
- package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/EventBufferArray.d.ts +2 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/EventBufferCompressionWorker.d.ts +5 -3
- package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/EventBufferProxy.d.ts +4 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/WorkerHandler.d.ts +3 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/index.d.ts +2 -2
- package/{types-ts3.8 → build/npm/types-ts3.8}/integration.d.ts +26 -13
- package/{types-ts3.8 → build/npm/types-ts3.8}/replay.d.ts +32 -27
- package/{types-ts3.8 → build/npm/types-ts3.8}/session/fetchSession.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/session/loadOrCreateSession.d.ts +1 -2
- package/{types-ts3.8 → build/npm/types-ts3.8}/types/performance.d.ts +16 -4
- package/{types-ts3.8 → build/npm/types-ts3.8}/types/replay.d.ts +53 -42
- package/{types-ts3.8 → build/npm/types-ts3.8}/types/replayFrame.d.ts +14 -7
- package/{types-ts3.8 → build/npm/types-ts3.8}/types/request.d.ts +1 -1
- package/{types → build/npm/types-ts3.8}/types/rrweb.d.ts +64 -60
- package/build/npm/types-ts3.8/util/createPerformanceEntries.d.ts +52 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/createReplayEnvelope.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/eventUtils.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/getPrivacyOptions.d.ts +3 -3
- package/build/npm/types-ts3.8/util/getRecordingSamplingOptions.d.ts +10 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/handleRecordingEmit.d.ts +1 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/isRrwebError.d.ts +1 -1
- package/build/npm/types-ts3.8/util/logger.d.ts +24 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/maskAttribute.d.ts +2 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/prepareRecordingData.d.ts +1 -1
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/prepareReplayEvent.d.ts +2 -5
- package/build/npm/types-ts3.8/util/resetReplayIdOnDynamicSamplingContext.d.ts +14 -0
- package/build/npm/types-ts3.8/util/rrweb.d.ts +7 -0
- package/{types-ts3.8 → build/npm/types-ts3.8}/util/sendReplayRequest.d.ts +8 -2
- package/build/npm/types-ts3.8/worker-bundler.d.ts +2 -0
- package/package.json +65 -27
- package/cjs/index.js +0 -9382
- package/cjs/index.js.map +0 -1
- package/esm/index.js +0 -9375
- package/esm/index.js.map +0 -1
- package/esm/package.json +0 -1
- package/types/constants.d.ts.map +0 -1
- package/types/coreHandlers/performanceObserver.d.ts.map +0 -1
- package/types/coreHandlers/util/fetchUtils.d.ts.map +0 -1
- package/types/coreHandlers/util/networkUtils.d.ts.map +0 -1
- package/types/coreHandlers/util/xhrUtils.d.ts.map +0 -1
- package/types/eventBuffer/EventBufferArray.d.ts.map +0 -1
- package/types/eventBuffer/EventBufferCompressionWorker.d.ts.map +0 -1
- package/types/eventBuffer/EventBufferProxy.d.ts.map +0 -1
- package/types/eventBuffer/WorkerHandler.d.ts.map +0 -1
- package/types/eventBuffer/index.d.ts.map +0 -1
- package/types/integration.d.ts.map +0 -1
- package/types/replay.d.ts.map +0 -1
- package/types/session/fetchSession.d.ts +0 -6
- package/types/session/fetchSession.d.ts.map +0 -1
- package/types/session/index.d.ts +0 -2
- package/types/session/index.d.ts.map +0 -1
- package/types/session/loadOrCreateSession.d.ts.map +0 -1
- package/types/types/replay.d.ts.map +0 -1
- package/types/types/replayFrame.d.ts.map +0 -1
- package/types/types/request.d.ts.map +0 -1
- package/types/util/createPerformanceEntries.d.ts +0 -13
- package/types/util/createPerformanceEntries.d.ts.map +0 -1
- package/types/util/getPrivacyOptions.d.ts.map +0 -1
- package/types/util/handleRecordingEmit.d.ts.map +0 -1
- package/types/util/log.d.ts +0 -10
- package/types/util/log.d.ts.map +0 -1
- package/types/util/prepareReplayEvent.d.ts.map +0 -1
- package/types/util/sendReplayRequest.d.ts.map +0 -1
- package/types-ts3.8/session/index.d.ts +0 -2
- package/types-ts3.8/util/createPerformanceEntries.d.ts +0 -13
- package/types-ts3.8/util/log.d.ts +0 -10
- /package/{types → build/npm/types}/coreHandlers/performanceObserver.d.ts +0 -0
- /package/{types → build/npm/types}/coreHandlers/util/addNetworkBreadcrumb.d.ts +0 -0
- /package/{types → build/npm/types}/coreHandlers/util/getAttributesToRecord.d.ts +0 -0
- /package/{types → build/npm/types}/coreHandlers/util/onWindowOpen.d.ts +0 -0
- /package/{types → build/npm/types}/debug-build.d.ts +0 -0
- /package/{types → build/npm/types}/debug-build.d.ts.map +0 -0
- /package/{types → build/npm/types}/eventBuffer/error.d.ts +0 -0
- /package/{types → build/npm/types}/eventBuffer/error.d.ts.map +0 -0
- /package/{types → build/npm/types}/index.d.ts +0 -0
- /package/{types → build/npm/types}/index.d.ts.map +0 -0
- /package/{types → build/npm/types}/session/Session.d.ts +0 -0
- /package/{types → build/npm/types}/session/clearSession.d.ts +0 -0
- /package/{types → build/npm/types}/session/clearSession.d.ts.map +0 -0
- /package/{types → build/npm/types}/session/createSession.d.ts +0 -0
- /package/{types → build/npm/types}/session/createSession.d.ts.map +0 -0
- /package/{types → build/npm/types}/session/saveSession.d.ts +0 -0
- /package/{types → build/npm/types}/session/saveSession.d.ts.map +0 -0
- /package/{types → build/npm/types}/session/shouldRefreshSession.d.ts +0 -0
- /package/{types → build/npm/types}/session/shouldRefreshSession.d.ts.map +0 -0
- /package/{types → build/npm/types}/types/index.d.ts +0 -0
- /package/{types → build/npm/types}/types/index.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/addEvent.d.ts +0 -0
- /package/{types → build/npm/types}/util/addGlobalListeners.d.ts +0 -0
- /package/{types → build/npm/types}/util/addMemoryEntry.d.ts +0 -0
- /package/{types → build/npm/types}/util/addMemoryEntry.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/createBreadcrumb.d.ts +0 -0
- /package/{types → build/npm/types}/util/createBreadcrumb.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/createPerformanceSpans.d.ts +0 -0
- /package/{types → build/npm/types}/util/debounce.d.ts +0 -0
- /package/{types → build/npm/types}/util/getReplay.d.ts +0 -0
- /package/{types → build/npm/types}/util/getReplay.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/hasSessionStorage.d.ts +0 -0
- /package/{types → build/npm/types}/util/hasSessionStorage.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/isExpired.d.ts +0 -0
- /package/{types → build/npm/types}/util/isExpired.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/isSampled.d.ts +0 -0
- /package/{types → build/npm/types}/util/isSampled.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/isSessionExpired.d.ts +0 -0
- /package/{types → build/npm/types}/util/isSessionExpired.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/sendReplay.d.ts +0 -0
- /package/{types → build/npm/types}/util/shouldFilterRequest.d.ts +0 -0
- /package/{types → build/npm/types}/util/throttle.d.ts +0 -0
- /package/{types → build/npm/types}/util/throttle.d.ts.map +0 -0
- /package/{types → build/npm/types}/util/timestamp.d.ts +0 -0
- /package/{types → build/npm/types}/util/timestamp.d.ts.map +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/performanceObserver.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/addNetworkBreadcrumb.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/getAttributesToRecord.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/coreHandlers/util/onWindowOpen.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/debug-build.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/eventBuffer/error.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/index.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/session/Session.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/session/clearSession.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/session/createSession.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/session/saveSession.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/session/shouldRefreshSession.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/types/index.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/addEvent.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/addGlobalListeners.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/addMemoryEntry.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/createBreadcrumb.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/createPerformanceSpans.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/debounce.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/getReplay.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/hasSessionStorage.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/isExpired.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/isSampled.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/isSessionExpired.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/sendReplay.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/shouldFilterRequest.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/throttle.d.ts +0 -0
- /package/{types-ts3.8 → build/npm/types-ts3.8}/util/timestamp.d.ts +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AllPerformanceEntry, AllPerformanceEntryData, ReplayContainer, ReplayPerformanceEntry, WebVitalData } from '../types';
|
|
2
|
+
export interface Metric {
|
|
3
|
+
/**
|
|
4
|
+
* The current value of the metric.
|
|
5
|
+
*/
|
|
6
|
+
value: number;
|
|
7
|
+
/**
|
|
8
|
+
* The rating as to whether the metric value is within the "good",
|
|
9
|
+
* "needs improvement", or "poor" thresholds of the metric.
|
|
10
|
+
*/
|
|
11
|
+
rating: 'good' | 'needs-improvement' | 'poor';
|
|
12
|
+
/**
|
|
13
|
+
* Any performance entries relevant to the metric value calculation.
|
|
14
|
+
* The array may also be empty if the metric value was not based on any
|
|
15
|
+
* entries (e.g. a CLS value of 0 given no layout shifts).
|
|
16
|
+
*/
|
|
17
|
+
entries: PerformanceEntry[] | LayoutShift[];
|
|
18
|
+
}
|
|
19
|
+
interface LayoutShift extends PerformanceEntry {
|
|
20
|
+
value: number;
|
|
21
|
+
sources: LayoutShiftAttribution[];
|
|
22
|
+
hadRecentInput: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface LayoutShiftAttribution {
|
|
25
|
+
node?: Node;
|
|
26
|
+
previousRect: DOMRectReadOnly;
|
|
27
|
+
currentRect: DOMRectReadOnly;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Handler creater for web vitals
|
|
31
|
+
*/
|
|
32
|
+
export declare function webVitalHandler(getter: (metric: Metric) => ReplayPerformanceEntry<AllPerformanceEntryData>, replay: ReplayContainer): (data: {
|
|
33
|
+
metric: Metric;
|
|
34
|
+
}) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Create replay performance entries from the browser performance entries.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createPerformanceEntries(entries: AllPerformanceEntry[]): ReplayPerformanceEntry<AllPerformanceEntryData>[];
|
|
39
|
+
/**
|
|
40
|
+
* Add a LCP event to the replay based on a LCP metric.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
|
|
43
|
+
/**
|
|
44
|
+
* Add a CLS event to the replay based on a CLS metric.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getCumulativeLayoutShift(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
|
|
47
|
+
/**
|
|
48
|
+
* Add an INP event to the replay based on an INP metric.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getInteractionToNextPaint(metric: Metric): ReplayPerformanceEntry<WebVitalData>;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=createPerformanceEntries.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DsnComponents, ReplayEnvelope, ReplayEvent, ReplayRecordingData } from '@sentry/
|
|
1
|
+
import { DsnComponents, ReplayEnvelope, ReplayEvent, ReplayRecordingData } from '@sentry/core';
|
|
2
2
|
/**
|
|
3
3
|
* Create a replay envelope ready to be sent.
|
|
4
4
|
* This includes both the replay event, as well as the recording data.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorEvent, Event, FeedbackEvent, ReplayEvent, TransactionEvent } from '@sentry/
|
|
1
|
+
import { ErrorEvent, Event, FeedbackEvent, ReplayEvent, TransactionEvent } from '@sentry/core';
|
|
2
2
|
/** If the event is an error event */
|
|
3
3
|
export declare function isErrorEvent(event: Event): event is ErrorEvent;
|
|
4
4
|
/** If the event is a transaction event */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type GetPrivacyOptions = Required<Pick<ReplayIntegrationPrivacyOptions, Exclude<keyof ReplayIntegrationPrivacyOptions, 'maskFn'
|
|
1
|
+
import { ReplayIntegrationPrivacyOptions } from '../types';
|
|
2
|
+
type GetPrivacyOptions = Required<Pick<ReplayIntegrationPrivacyOptions, Exclude<keyof ReplayIntegrationPrivacyOptions, 'maskFn'>>>;
|
|
3
3
|
interface GetPrivacyReturn {
|
|
4
4
|
maskTextSelector: string;
|
|
5
5
|
unmaskTextSelector: string;
|
|
@@ -12,6 +12,6 @@ interface GetPrivacyReturn {
|
|
|
12
12
|
/**
|
|
13
13
|
* Returns privacy related configuration for use in rrweb
|
|
14
14
|
*/
|
|
15
|
-
export declare function getPrivacyOptions({ mask, unmask, block, unblock, ignore
|
|
15
|
+
export declare function getPrivacyOptions({ mask, unmask, block, unblock, ignore }: GetPrivacyOptions): GetPrivacyReturn;
|
|
16
16
|
export {};
|
|
17
17
|
//# sourceMappingURL=getPrivacyOptions.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disable sampling mousemove events on iOS browsers as this can cause blocking the main thread
|
|
3
|
+
* https://github.com/getsentry/sentry-javascript/issues/14534
|
|
4
|
+
*/
|
|
5
|
+
export declare function getRecordingSamplingOptions(): Partial<{
|
|
6
|
+
sampling: {
|
|
7
|
+
mousemove: boolean;
|
|
8
|
+
};
|
|
9
|
+
}>;
|
|
10
|
+
//# sourceMappingURL=getRecordingSamplingOptions.d.ts.map
|
|
@@ -6,6 +6,7 @@ type RecordingEmitCallback = (event: RecordingEvent, isCheckout?: boolean) => vo
|
|
|
6
6
|
* Adds to event buffer, and has varying flushing behaviors if the event was a checkout.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getHandleRecordingEmit(replay: ReplayContainer): RecordingEmitCallback;
|
|
9
|
+
export declare function syncMirrorAttributesFromMutationEvent(event: RecordingEvent): void;
|
|
9
10
|
/**
|
|
10
11
|
* Exported for tests
|
|
11
12
|
*/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { debug as coreDebug } from '@sentry/core';
|
|
2
|
+
interface LoggerConfig {
|
|
3
|
+
captureExceptions: boolean;
|
|
4
|
+
traceInternals: boolean;
|
|
5
|
+
}
|
|
6
|
+
type CoreDebugLogger = typeof coreDebug;
|
|
7
|
+
interface ReplayDebugLogger extends CoreDebugLogger {
|
|
8
|
+
/**
|
|
9
|
+
* Calls `debug.log` but saves breadcrumb in the next tick due to race
|
|
10
|
+
* conditions before replay is initialized.
|
|
11
|
+
*/
|
|
12
|
+
infoTick: CoreDebugLogger['log'];
|
|
13
|
+
/**
|
|
14
|
+
* Captures exceptions (`Error`) if "capture internal exceptions" is enabled
|
|
15
|
+
*/
|
|
16
|
+
exception: CoreDebugLogger['error'];
|
|
17
|
+
/**
|
|
18
|
+
* Configures the logger with additional debugging behavior
|
|
19
|
+
*/
|
|
20
|
+
setConfig(config: Partial<LoggerConfig>): void;
|
|
21
|
+
}
|
|
22
|
+
export declare const debug: ReplayDebugLogger;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -9,6 +9,8 @@ interface MaskAttributeParams {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Masks an attribute if necessary, otherwise return attribute value as-is.
|
|
12
|
+
* Keys listed in `maskAttributes` are masked even when `maskAllText` is false;
|
|
13
|
+
* masking `value` on submit/button inputs without listing `value` still requires `maskAllText`.
|
|
12
14
|
*/
|
|
13
15
|
export declare function maskAttribute({ el, key, maskAttributes, maskAllText, privacyOptions, value, }: MaskAttributeParams): string;
|
|
14
16
|
export {};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Client, ReplayEvent, Scope } from '@sentry/types';
|
|
1
|
+
import { Client, ReplayEvent, Scope } from '@sentry/core';
|
|
3
2
|
/**
|
|
4
3
|
* Prepare a replay event & enrich it with the SDK metadata.
|
|
5
4
|
*/
|
|
6
5
|
export declare function prepareReplayEvent({ client, scope, replayId: event_id, event, }: {
|
|
7
|
-
client: Client
|
|
8
|
-
_integrations?: IntegrationIndex;
|
|
9
|
-
};
|
|
6
|
+
client: Client;
|
|
10
7
|
scope: Scope;
|
|
11
8
|
replayId: string;
|
|
12
9
|
event: ReplayEvent;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reset the `replay_id` field on the DSC.
|
|
3
|
+
*/
|
|
4
|
+
export declare function resetReplayIdOnDynamicSamplingContext(): void;
|
|
5
|
+
/**
|
|
6
|
+
* Set the `replay_id` field on the cached DSC.
|
|
7
|
+
* This is needed after a session refresh because the cached DSC on the scope
|
|
8
|
+
* (set by browserTracingIntegration when the idle span ended) persists across
|
|
9
|
+
* session boundaries. Without updating it, the new session's replay_id would
|
|
10
|
+
* never appear in DSC since `getDynamicSamplingContextFromClient` (and its
|
|
11
|
+
* `createDsc` hook) is not called when a cached DSC already exists.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setReplayIdOnDynamicSamplingContext(replayId: string): void;
|
|
14
|
+
//# sourceMappingURL=resetReplayIdOnDynamicSamplingContext.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TransportMakeRequestResponse } from '@sentry/
|
|
2
|
-
import { RateLimits } from '@sentry/utils';
|
|
1
|
+
import { RateLimits, TransportMakeRequestResponse } from '@sentry/core';
|
|
3
2
|
import { SendReplayData } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* Send replay attachment using `fetch()`
|
|
@@ -18,4 +17,11 @@ export declare class RateLimitError extends Error {
|
|
|
18
17
|
rateLimits: RateLimits;
|
|
19
18
|
constructor(rateLimits: RateLimits);
|
|
20
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* This error indicates that the replay duration limit was exceeded and the session is too long.
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class ReplayDurationLimitError extends Error {
|
|
25
|
+
constructor();
|
|
26
|
+
}
|
|
21
27
|
//# sourceMappingURL=sendReplayRequest.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,37 +1,73 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/replay",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.58.0",
|
|
4
4
|
"description": "User replays for Sentry",
|
|
5
|
-
"main": "cjs/index.js",
|
|
6
|
-
"module": "esm/index.js",
|
|
7
|
-
"types": "types/index.d.ts",
|
|
5
|
+
"main": "build/npm/cjs/index.js",
|
|
6
|
+
"module": "build/npm/esm/index.js",
|
|
7
|
+
"types": "build/npm/types/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
"./package.json": "./package.json",
|
|
10
|
+
"./worker-bundler": {
|
|
11
|
+
"react-native": "./build/npm/esm/worker-bundler.js",
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./build/npm/types/worker-bundler.d.ts",
|
|
14
|
+
"default": "./build/npm/esm/worker-bundler.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./build/npm/types/worker-bundler.d.ts",
|
|
18
|
+
"default": "./build/npm/cjs/worker-bundler.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
10
21
|
".": {
|
|
22
|
+
"react-native": "./build/npm/esm/index.js",
|
|
11
23
|
"import": {
|
|
12
|
-
"types": "./types/index.d.ts",
|
|
13
|
-
"default": "./esm/index.js"
|
|
24
|
+
"types": "./build/npm/types/index.d.ts",
|
|
25
|
+
"default": "./build/npm/esm/index.js"
|
|
14
26
|
},
|
|
15
27
|
"require": {
|
|
16
|
-
"types": "./types/index.d.ts",
|
|
17
|
-
"default": "./cjs/index.js"
|
|
28
|
+
"types": "./build/npm/types/index.d.ts",
|
|
29
|
+
"default": "./build/npm/cjs/index.js"
|
|
18
30
|
}
|
|
19
31
|
}
|
|
20
32
|
},
|
|
21
33
|
"typesVersions": {
|
|
22
|
-
"<
|
|
23
|
-
"types/index.d.ts": [
|
|
24
|
-
"types-ts3.8/index.d.ts"
|
|
34
|
+
"<5.0": {
|
|
35
|
+
"build/npm/types/index.d.ts": [
|
|
36
|
+
"build/npm/types-ts3.8/index.d.ts"
|
|
25
37
|
]
|
|
26
38
|
}
|
|
27
39
|
},
|
|
28
40
|
"files": [
|
|
29
|
-
"
|
|
30
|
-
"esm",
|
|
31
|
-
"types",
|
|
32
|
-
"types-ts3.8"
|
|
41
|
+
"/build/npm"
|
|
33
42
|
],
|
|
34
43
|
"sideEffects": false,
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "run-p build:transpile build:types build:bundle",
|
|
49
|
+
"build:transpile": "rollup -c rollup.npm.config.mjs",
|
|
50
|
+
"build:bundle": "rollup -c rollup.bundle.config.mjs",
|
|
51
|
+
"build:dev": "run-p build:transpile build:types",
|
|
52
|
+
"build:types": "run-s build:types:core build:types:downlevel",
|
|
53
|
+
"build:types:core": "tsc -p tsconfig.types.json",
|
|
54
|
+
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
|
|
55
|
+
"build:watch": "run-p build:transpile:watch build:bundle:watch",
|
|
56
|
+
"build:dev:watch": "run-p build:transpile:watch",
|
|
57
|
+
"build:transpile:watch": "yarn build:transpile --watch",
|
|
58
|
+
"build:bundle:watch": "yarn build:bundle --watch",
|
|
59
|
+
"build:tarball": "npm pack",
|
|
60
|
+
"circularDepCheck": "madge --circular src/index.ts",
|
|
61
|
+
"clean": "rimraf build sentry-replay-*.tgz",
|
|
62
|
+
"format": "oxfmt \"src/**/*.ts\" \"test/**/*.ts\" --write",
|
|
63
|
+
"format:check": "oxfmt \"src/**/*.ts\" \"test/**/*.ts\" --check",
|
|
64
|
+
"lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware",
|
|
65
|
+
"lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware",
|
|
66
|
+
"lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module",
|
|
67
|
+
"test": "vitest run",
|
|
68
|
+
"test:watch": "vitest --watch",
|
|
69
|
+
"yalc:publish": "yalc publish --push --sig"
|
|
70
|
+
},
|
|
35
71
|
"repository": {
|
|
36
72
|
"type": "git",
|
|
37
73
|
"url": "git+https://github.com/getsentry/sentry-javascript.git"
|
|
@@ -43,20 +79,22 @@
|
|
|
43
79
|
},
|
|
44
80
|
"homepage": "https://docs.sentry.io/platforms/javascript/session-replay/",
|
|
45
81
|
"devDependencies": {
|
|
46
|
-
"@babel/core": "^7.
|
|
47
|
-
"@sentry-internal/replay-worker": "
|
|
48
|
-
"@sentry
|
|
49
|
-
"@sentry
|
|
50
|
-
"fflate": "
|
|
51
|
-
"
|
|
82
|
+
"@babel/core": "^7.27.7",
|
|
83
|
+
"@sentry-internal/replay-worker": "10.58.0",
|
|
84
|
+
"@sentry/rrweb": "2.43.2",
|
|
85
|
+
"@sentry/rrweb-snapshot": "2.43.2",
|
|
86
|
+
"fflate": "0.8.2",
|
|
87
|
+
"jest-matcher-utils": "^29.0.0",
|
|
88
|
+
"jsdom-worker": "^0.3.0"
|
|
52
89
|
},
|
|
53
90
|
"dependencies": {
|
|
54
|
-
"@sentry-
|
|
55
|
-
"@sentry/core": "
|
|
56
|
-
"@sentry/types": "8.0.0-alpha.5",
|
|
57
|
-
"@sentry/utils": "8.0.0-alpha.5"
|
|
91
|
+
"@sentry/browser-utils": "10.58.0",
|
|
92
|
+
"@sentry/core": "10.58.0"
|
|
58
93
|
},
|
|
59
94
|
"engines": {
|
|
60
|
-
"node": ">=
|
|
95
|
+
"node": ">=18"
|
|
96
|
+
},
|
|
97
|
+
"volta": {
|
|
98
|
+
"extends": "../../package.json"
|
|
61
99
|
}
|
|
62
|
-
}
|
|
100
|
+
}
|