@sentry/replay 10.70.0 → 11.0.0-alpha.1
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/build/npm/cjs/index.js +12 -12
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/esm/index.js +12 -12
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/types/coreHandlers/handleClick.d.ts.map +1 -1
- package/build/npm/types/coreHandlers/handleDom.d.ts.map +1 -1
- package/build/npm/types/coreHandlers/util/addFeedbackBreadcrumb.d.ts.map +1 -1
- package/build/npm/types/eventBuffer/EventBufferArray.d.ts.map +1 -1
- package/build/npm/types/eventBuffer/EventBufferCompressionWorker.d.ts.map +1 -1
- package/build/npm/types/eventBuffer/EventBufferProxy.d.ts.map +1 -1
- package/build/npm/types/eventBuffer/WorkerHandler.d.ts.map +1 -1
- package/build/npm/types/eventBuffer/error.d.ts.map +1 -1
- package/build/npm/types/integration.d.ts.map +1 -1
- package/build/npm/types/replay.d.ts.map +1 -1
- package/build/npm/types/util/createPerformanceEntries.d.ts.map +1 -1
- package/build/npm/types/util/sendReplayRequest.d.ts.map +1 -1
- package/package.json +8 -17
- package/build/npm/types-ts3.8/constants.d.ts +0 -28
- package/build/npm/types-ts3.8/coreHandlers/handleAfterSendEvent.d.ts +0 -9
- package/build/npm/types-ts3.8/coreHandlers/handleBeforeSendEvent.d.ts +0 -9
- package/build/npm/types-ts3.8/coreHandlers/handleBreadcrumbs.d.ts +0 -14
- package/build/npm/types-ts3.8/coreHandlers/handleClick.d.ts +0 -47
- package/build/npm/types-ts3.8/coreHandlers/handleDom.d.ts +0 -11
- package/build/npm/types-ts3.8/coreHandlers/handleGlobalEvent.d.ts +0 -7
- package/build/npm/types-ts3.8/coreHandlers/handleHistory.d.ts +0 -7
- package/build/npm/types-ts3.8/coreHandlers/handleKeyboardEvent.d.ts +0 -7
- package/build/npm/types-ts3.8/coreHandlers/handleNetworkBreadcrumbs.d.ts +0 -16
- package/build/npm/types-ts3.8/coreHandlers/handleProcessSegmentSpan.d.ts +0 -6
- package/build/npm/types-ts3.8/coreHandlers/performanceObserver.d.ts +0 -7
- package/build/npm/types-ts3.8/coreHandlers/util/addBreadcrumbEvent.d.ts +0 -7
- package/build/npm/types-ts3.8/coreHandlers/util/addFeedbackBreadcrumb.d.ts +0 -7
- package/build/npm/types-ts3.8/coreHandlers/util/addNetworkBreadcrumb.d.ts +0 -4
- package/build/npm/types-ts3.8/coreHandlers/util/addSegmentDetailsToContext.d.ts +0 -3
- package/build/npm/types-ts3.8/coreHandlers/util/domUtils.d.ts +0 -15
- package/build/npm/types-ts3.8/coreHandlers/util/fetchUtils.d.ts +0 -23
- package/build/npm/types-ts3.8/coreHandlers/util/getAttributesToRecord.d.ts +0 -5
- package/build/npm/types-ts3.8/coreHandlers/util/networkUtils.d.ts +0 -21
- package/build/npm/types-ts3.8/coreHandlers/util/onWindowOpen.d.ts +0 -8
- package/build/npm/types-ts3.8/coreHandlers/util/shouldSampleForBufferEvent.d.ts +0 -9
- package/build/npm/types-ts3.8/coreHandlers/util/xhrUtils.d.ts +0 -36
- package/build/npm/types-ts3.8/debug-build.d.ts +0 -7
- package/build/npm/types-ts3.8/eventBuffer/EventBufferArray.d.ts +0 -30
- package/build/npm/types-ts3.8/eventBuffer/EventBufferCompressionWorker.d.ts +0 -52
- package/build/npm/types-ts3.8/eventBuffer/EventBufferProxy.d.ts +0 -45
- package/build/npm/types-ts3.8/eventBuffer/WorkerHandler.d.ts +0 -29
- package/build/npm/types-ts3.8/eventBuffer/error.d.ts +0 -5
- package/build/npm/types-ts3.8/eventBuffer/index.d.ts +0 -11
- package/build/npm/types-ts3.8/index.d.ts +0 -4
- package/build/npm/types-ts3.8/integration.d.ts +0 -117
- package/build/npm/types-ts3.8/replay.d.ts +0 -320
- package/build/npm/types-ts3.8/session/Session.d.ts +0 -8
- package/build/npm/types-ts3.8/session/clearSession.d.ts +0 -6
- package/build/npm/types-ts3.8/session/createSession.d.ts +0 -14
- package/build/npm/types-ts3.8/session/fetchSession.d.ts +0 -6
- package/build/npm/types-ts3.8/session/loadOrCreateSession.d.ts +0 -11
- package/build/npm/types-ts3.8/session/saveSession.d.ts +0 -6
- package/build/npm/types-ts3.8/session/shouldRefreshSession.d.ts +0 -7
- package/build/npm/types-ts3.8/types/index.d.ts +0 -6
- package/build/npm/types-ts3.8/types/performance.d.ts +0 -136
- package/build/npm/types-ts3.8/types/replay.d.ts +0 -487
- package/build/npm/types-ts3.8/types/replayFrame.d.ts +0 -188
- package/build/npm/types-ts3.8/types/request.d.ts +0 -15
- package/build/npm/types-ts3.8/types/rrweb.d.ts +0 -64
- package/build/npm/types-ts3.8/util/addEvent.d.ts +0 -20
- package/build/npm/types-ts3.8/util/addGlobalListeners.d.ts +0 -6
- package/build/npm/types-ts3.8/util/addMemoryEntry.d.ts +0 -7
- package/build/npm/types-ts3.8/util/createBreadcrumb.d.ts +0 -6
- package/build/npm/types-ts3.8/util/createPerformanceEntries.d.ts +0 -52
- package/build/npm/types-ts3.8/util/createPerformanceSpans.d.ts +0 -6
- package/build/npm/types-ts3.8/util/createReplayEnvelope.d.ts +0 -7
- package/build/npm/types-ts3.8/util/debounce.d.ts +0 -30
- package/build/npm/types-ts3.8/util/eventUtils.d.ts +0 -10
- package/build/npm/types-ts3.8/util/getPrivacyOptions.d.ts +0 -17
- package/build/npm/types-ts3.8/util/getRecordingSamplingOptions.d.ts +0 -10
- package/build/npm/types-ts3.8/util/getReplay.d.ts +0 -6
- package/build/npm/types-ts3.8/util/handleRecordingEmit.d.ts +0 -15
- package/build/npm/types-ts3.8/util/hasSessionStorage.d.ts +0 -3
- package/build/npm/types-ts3.8/util/isExpired.d.ts +0 -6
- package/build/npm/types-ts3.8/util/isRrwebError.d.ts +0 -6
- package/build/npm/types-ts3.8/util/isSampled.d.ts +0 -8
- package/build/npm/types-ts3.8/util/isSessionExpired.d.ts +0 -10
- package/build/npm/types-ts3.8/util/logger.d.ts +0 -24
- package/build/npm/types-ts3.8/util/maskAttribute.d.ts +0 -17
- package/build/npm/types-ts3.8/util/prepareRecordingData.d.ts +0 -9
- package/build/npm/types-ts3.8/util/prepareReplayEvent.d.ts +0 -11
- package/build/npm/types-ts3.8/util/resetReplayIdOnDynamicSamplingContext.d.ts +0 -14
- package/build/npm/types-ts3.8/util/rrweb.d.ts +0 -7
- package/build/npm/types-ts3.8/util/sendReplay.d.ts +0 -9
- package/build/npm/types-ts3.8/util/sendReplayRequest.d.ts +0 -27
- package/build/npm/types-ts3.8/util/shouldFilterRequest.d.ts +0 -7
- package/build/npm/types-ts3.8/util/throttle.d.ts +0 -12
- package/build/npm/types-ts3.8/util/timestamp.d.ts +0 -9
- package/build/npm/types-ts3.8/worker-bundler.d.ts +0 -2
package/build/npm/cjs/index.js
CHANGED
|
@@ -4946,11 +4946,7 @@ const handleDomListener = (replay) => {
|
|
|
4946
4946
|
const isClick = handlerData.name === "click";
|
|
4947
4947
|
const event = isClick ? handlerData.event : void 0;
|
|
4948
4948
|
if (isClick && replay.clickDetector && event?.target && !event.altKey && !event.metaKey && !event.ctrlKey && !event.shiftKey) {
|
|
4949
|
-
handleClick(
|
|
4950
|
-
replay.clickDetector,
|
|
4951
|
-
result,
|
|
4952
|
-
getClickTargetNode(handlerData.event)
|
|
4953
|
-
);
|
|
4949
|
+
handleClick(replay.clickDetector, result, getClickTargetNode(handlerData.event));
|
|
4954
4950
|
}
|
|
4955
4951
|
addBreadcrumbEvent(replay, result);
|
|
4956
4952
|
};
|
|
@@ -5039,6 +5035,7 @@ function isInputElement(target) {
|
|
|
5039
5035
|
const ENTRY_TYPES = {
|
|
5040
5036
|
// @ts-expect-error TODO: entry type does not fit the create* functions entry type
|
|
5041
5037
|
resource: createResourceEntry,
|
|
5038
|
+
// @ts-expect-error TODO: entry type does not fit the create* functions entry type
|
|
5042
5039
|
paint: createPaintEntry,
|
|
5043
5040
|
// @ts-expect-error TODO: entry type does not fit the create* functions entry type
|
|
5044
5041
|
navigation: createNavigationEntry
|
|
@@ -6096,7 +6093,7 @@ function addFeedbackBreadcrumb(replay, event) {
|
|
|
6096
6093
|
if (!event.timestamp) {
|
|
6097
6094
|
return true;
|
|
6098
6095
|
}
|
|
6099
|
-
replay.throttledAddEvent({
|
|
6096
|
+
void replay.throttledAddEvent({
|
|
6100
6097
|
type: EventType.Custom,
|
|
6101
6098
|
timestamp: event.timestamp * 1e3,
|
|
6102
6099
|
data: {
|
|
@@ -6594,7 +6591,7 @@ function _tryGetResponseText(response) {
|
|
|
6594
6591
|
});
|
|
6595
6592
|
}
|
|
6596
6593
|
async function _getResponseText(response) {
|
|
6597
|
-
return
|
|
6594
|
+
return response.text();
|
|
6598
6595
|
}
|
|
6599
6596
|
|
|
6600
6597
|
async function captureXhrBreadcrumbToReplay(breadcrumb, hint, options) {
|
|
@@ -6806,7 +6803,7 @@ function addGlobalListeners(replay) {
|
|
|
6806
6803
|
|
|
6807
6804
|
async function addMemoryEntry(replay) {
|
|
6808
6805
|
try {
|
|
6809
|
-
return Promise.all(
|
|
6806
|
+
return await Promise.all(
|
|
6810
6807
|
createPerformanceSpans(replay, [
|
|
6811
6808
|
// @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above)
|
|
6812
6809
|
createMemoryEntry(WINDOW.performance.memory)
|
|
@@ -7676,12 +7673,15 @@ class ReplayContainer {
|
|
|
7676
7673
|
getCurrentRoute() {
|
|
7677
7674
|
const lastActiveSpan = this.lastActiveSpan || core.getActiveSpan();
|
|
7678
7675
|
const lastRootSpan = lastActiveSpan && core.getRootSpan(lastActiveSpan);
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7676
|
+
if (!lastRootSpan) {
|
|
7677
|
+
return void 0;
|
|
7678
|
+
}
|
|
7679
|
+
const spanJson = core.spanToJSON(lastRootSpan);
|
|
7680
|
+
const source = spanJson.attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
7681
|
+
if (!source || !["route", "custom"].includes(source)) {
|
|
7682
7682
|
return void 0;
|
|
7683
7683
|
}
|
|
7684
|
-
return
|
|
7684
|
+
return spanJson.name;
|
|
7685
7685
|
}
|
|
7686
7686
|
/**
|
|
7687
7687
|
* Initialize and start all listeners to varying events (DOM,
|