@sentry/replay 11.10.0 → 11.11.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/build/npm/cjs/index.js +7 -4
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/esm/index.js +7 -4
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/types/coreHandlers/util/shouldSampleForBufferEvent.d.ts.map +1 -1
- package/build/npm/types/integration.d.ts.map +1 -1
- package/package.json +6 -7
package/build/npm/esm/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { GLOBAL_OBJ, normalize, isObjectLike, fill, _INTERNAL_performanceTimeToSeconds, debug as debug$1, severityLevelFromString, captureException, addBreadcrumb, uuid4, getClient, getCurrentScope, getActiveSpan, getDynamicSamplingContextFromSpan, isSentryRequestUrl, stringMatchesSomePattern, addEventProcessor, debounce as debounce$1, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, prepareEvent, getIsolationScope, updateRateLimits, isRateLimited, setContext, getRootSpan, spanToJSON, isBrowser, safeSetSpanJSONAttributes, parseSampleRate, consoleSandbox } from '@sentry/core';
|
|
2
2
|
import { setTimeout as setTimeout$3, htmlTreeAsString, addPerformanceInstrumentationHandler, addLcpInstrumentationHandler, addClsInstrumentationHandler, addInpInstrumentationHandler, getLocationHref, serializeFormData, getFetchRequestArgBody, getBodyString, SENTRY_XHR_DATA_KEY, parseXhrResponseHeaders, addClickKeypressInstrumentationHandler, addHistoryInstrumentationHandler } from '@sentry/browser-utils';
|
|
3
3
|
|
|
4
|
+
const db="sentry.replay_id",kb="sentry.segment.name.source";
|
|
5
|
+
|
|
4
6
|
const WINDOW = GLOBAL_OBJ;
|
|
5
7
|
const REPLAY_SESSION_KEY = "sentryReplaySession";
|
|
6
8
|
const REPLAY_EVENT_NAME = "replay_event";
|
|
@@ -21,8 +23,6 @@ const MIN_REPLAY_DURATION = 4999;
|
|
|
21
23
|
const MIN_REPLAY_DURATION_LIMIT = 5e4;
|
|
22
24
|
const MAX_REPLAY_DURATION = 36e5;
|
|
23
25
|
|
|
24
|
-
const hb="sentry.segment.name.source";
|
|
25
|
-
|
|
26
26
|
var __defProp = Object.defineProperty;
|
|
27
27
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
28
28
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -6262,6 +6262,9 @@ function shouldSampleForBufferEvent(replay, event) {
|
|
|
6262
6262
|
if (!event.exception || event.type) {
|
|
6263
6263
|
return false;
|
|
6264
6264
|
}
|
|
6265
|
+
if (event.sdkProcessingMetadata?.hasDefaultSyntheticStacktrace) {
|
|
6266
|
+
return false;
|
|
6267
|
+
}
|
|
6265
6268
|
return isSampled(replay.getOptions().errorSampleRate);
|
|
6266
6269
|
}
|
|
6267
6270
|
|
|
@@ -7845,7 +7848,7 @@ class ReplayContainer {
|
|
|
7845
7848
|
return void 0;
|
|
7846
7849
|
}
|
|
7847
7850
|
const spanJson = spanToJSON(lastRootSpan);
|
|
7848
|
-
const source = spanJson.attributes[
|
|
7851
|
+
const source = spanJson.attributes[kb];
|
|
7849
7852
|
if (!source || !["route", "custom"].includes(source)) {
|
|
7850
7853
|
return void 0;
|
|
7851
7854
|
}
|
|
@@ -8526,7 +8529,7 @@ class Replay {
|
|
|
8526
8529
|
processSpan(span) {
|
|
8527
8530
|
const replayId = this.getReplayId(true);
|
|
8528
8531
|
if (replayId) {
|
|
8529
|
-
safeSetSpanJSONAttributes(span, {
|
|
8532
|
+
safeSetSpanJSONAttributes(span, { [db]: replayId });
|
|
8530
8533
|
if (this.getRecordingMode() === "buffer") {
|
|
8531
8534
|
safeSetSpanJSONAttributes(span, { "sentry._internal.replay_is_buffering": true });
|
|
8532
8535
|
}
|