@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.
@@ -3,6 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const core = require('@sentry/core');
4
4
  const browserUtils = require('@sentry/browser-utils');
5
5
 
6
+ const db="sentry.replay_id",kb="sentry.segment.name.source";
7
+
6
8
  const WINDOW = core.GLOBAL_OBJ;
7
9
  const REPLAY_SESSION_KEY = "sentryReplaySession";
8
10
  const REPLAY_EVENT_NAME = "replay_event";
@@ -23,8 +25,6 @@ const MIN_REPLAY_DURATION = 4999;
23
25
  const MIN_REPLAY_DURATION_LIMIT = 5e4;
24
26
  const MAX_REPLAY_DURATION = 36e5;
25
27
 
26
- const hb="sentry.segment.name.source";
27
-
28
28
  var __defProp = Object.defineProperty;
29
29
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
30
30
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -6264,6 +6264,9 @@ function shouldSampleForBufferEvent(replay, event) {
6264
6264
  if (!event.exception || event.type) {
6265
6265
  return false;
6266
6266
  }
6267
+ if (event.sdkProcessingMetadata?.hasDefaultSyntheticStacktrace) {
6268
+ return false;
6269
+ }
6267
6270
  return isSampled(replay.getOptions().errorSampleRate);
6268
6271
  }
6269
6272
 
@@ -7847,7 +7850,7 @@ class ReplayContainer {
7847
7850
  return void 0;
7848
7851
  }
7849
7852
  const spanJson = core.spanToJSON(lastRootSpan);
7850
- const source = spanJson.attributes[hb];
7853
+ const source = spanJson.attributes[kb];
7851
7854
  if (!source || !["route", "custom"].includes(source)) {
7852
7855
  return void 0;
7853
7856
  }
@@ -8528,7 +8531,7 @@ class Replay {
8528
8531
  processSpan(span) {
8529
8532
  const replayId = this.getReplayId(true);
8530
8533
  if (replayId) {
8531
- core.safeSetSpanJSONAttributes(span, { "sentry.replay_id": replayId });
8534
+ core.safeSetSpanJSONAttributes(span, { [db]: replayId });
8532
8535
  if (this.getRecordingMode() === "buffer") {
8533
8536
  core.safeSetSpanJSONAttributes(span, { "sentry._internal.replay_is_buffering": true });
8534
8537
  }