@sentry/browser 9.14.0 → 9.16.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/client.js.map +1 -1
- package/build/npm/cjs/helpers.js.map +1 -1
- package/build/npm/cjs/index.js +7 -7
- package/build/npm/cjs/integrations/breadcrumbs.js +1 -4
- package/build/npm/cjs/integrations/breadcrumbs.js.map +1 -1
- package/build/npm/cjs/integrations/browserapierrors.js.map +1 -1
- package/build/npm/cjs/integrations/browsersession.js +1 -1
- package/build/npm/cjs/integrations/browsersession.js.map +1 -1
- package/build/npm/cjs/integrations/contextlines.js.map +1 -1
- package/build/npm/cjs/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
- package/build/npm/cjs/integrations/featureFlags/launchdarkly/integration.js.map +1 -1
- package/build/npm/cjs/integrations/featureFlags/openfeature/integration.js.map +1 -1
- package/build/npm/cjs/integrations/featureFlags/statsig/integration.js.map +1 -1
- package/build/npm/cjs/integrations/featureFlags/unleash/integration.js.map +1 -1
- package/build/npm/cjs/integrations/globalhandlers.js.map +1 -1
- package/build/npm/cjs/integrations/graphqlClient.js +1 -1
- package/build/npm/cjs/integrations/graphqlClient.js.map +1 -1
- package/build/npm/cjs/integrations/httpclient.js +1 -1
- package/build/npm/cjs/integrations/httpclient.js.map +1 -1
- package/build/npm/cjs/integrations/reportingobserver.js.map +1 -1
- package/build/npm/cjs/integrations/spotlight.js +1 -1
- package/build/npm/cjs/integrations/spotlight.js.map +1 -1
- package/build/npm/cjs/log.js.map +1 -1
- package/build/npm/cjs/profiling/integration.js.map +1 -1
- package/build/npm/cjs/profiling/startProfileForSpan.js.map +1 -1
- package/build/npm/cjs/profiling/utils.js.map +1 -1
- package/build/npm/cjs/stack-parsers.js +0 -7
- package/build/npm/cjs/stack-parsers.js.map +1 -1
- package/build/npm/cjs/tracing/backgroundtab.js.map +1 -1
- package/build/npm/cjs/tracing/browserTracingIntegration.js +6 -18
- package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
- package/build/npm/cjs/tracing/linkedTraces.js +226 -0
- package/build/npm/cjs/tracing/linkedTraces.js.map +1 -0
- package/build/npm/cjs/tracing/request.js +23 -6
- package/build/npm/cjs/tracing/request.js.map +1 -1
- package/build/npm/cjs/transports/fetch.js +1 -1
- package/build/npm/cjs/transports/fetch.js.map +1 -1
- package/build/npm/cjs/userfeedback.js.map +1 -1
- package/build/npm/cjs/utils/featureFlags.js.map +1 -1
- package/build/npm/cjs/utils/lazyLoadIntegration.js.map +1 -1
- package/build/npm/esm/client.js.map +1 -1
- package/build/npm/esm/helpers.js.map +1 -1
- package/build/npm/esm/index.js +4 -4
- package/build/npm/esm/integrations/breadcrumbs.js +1 -4
- package/build/npm/esm/integrations/breadcrumbs.js.map +1 -1
- package/build/npm/esm/integrations/browserapierrors.js.map +1 -1
- package/build/npm/esm/integrations/browsersession.js +1 -1
- package/build/npm/esm/integrations/browsersession.js.map +1 -1
- package/build/npm/esm/integrations/contextlines.js.map +1 -1
- package/build/npm/esm/integrations/featureFlags/featureFlagsIntegration.js.map +1 -1
- package/build/npm/esm/integrations/featureFlags/launchdarkly/integration.js.map +1 -1
- package/build/npm/esm/integrations/featureFlags/openfeature/integration.js.map +1 -1
- package/build/npm/esm/integrations/featureFlags/statsig/integration.js.map +1 -1
- package/build/npm/esm/integrations/featureFlags/unleash/integration.js.map +1 -1
- package/build/npm/esm/integrations/globalhandlers.js.map +1 -1
- package/build/npm/esm/integrations/graphqlClient.js +1 -1
- package/build/npm/esm/integrations/graphqlClient.js.map +1 -1
- package/build/npm/esm/integrations/httpclient.js +1 -1
- package/build/npm/esm/integrations/httpclient.js.map +1 -1
- package/build/npm/esm/integrations/reportingobserver.js.map +1 -1
- package/build/npm/esm/integrations/spotlight.js +1 -1
- package/build/npm/esm/integrations/spotlight.js.map +1 -1
- package/build/npm/esm/log.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/esm/profiling/integration.js.map +1 -1
- package/build/npm/esm/profiling/startProfileForSpan.js.map +1 -1
- package/build/npm/esm/profiling/utils.js.map +1 -1
- package/build/npm/esm/stack-parsers.js +0 -7
- package/build/npm/esm/stack-parsers.js.map +1 -1
- package/build/npm/esm/tracing/backgroundtab.js.map +1 -1
- package/build/npm/esm/tracing/browserTracingIntegration.js +6 -18
- package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
- package/build/npm/esm/tracing/linkedTraces.js +217 -0
- package/build/npm/esm/tracing/linkedTraces.js.map +1 -0
- package/build/npm/esm/tracing/request.js +23 -6
- package/build/npm/esm/tracing/request.js.map +1 -1
- package/build/npm/esm/transports/fetch.js +1 -1
- package/build/npm/esm/transports/fetch.js.map +1 -1
- package/build/npm/esm/userfeedback.js.map +1 -1
- package/build/npm/esm/utils/featureFlags.js.map +1 -1
- package/build/npm/esm/utils/lazyLoadIntegration.js.map +1 -1
- package/build/npm/types/client.d.ts.map +1 -1
- package/build/npm/types/helpers.d.ts +1 -0
- package/build/npm/types/helpers.d.ts.map +1 -1
- package/build/npm/types/index.bundle.feedback.d.ts +0 -1
- package/build/npm/types/index.bundle.feedback.d.ts.map +1 -1
- package/build/npm/types/index.bundle.tracing.d.ts.map +1 -1
- package/build/npm/types/index.bundle.tracing.replay.d.ts +1 -1
- package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -1
- package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +2 -2
- package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -1
- package/build/npm/types/index.d.ts +4 -4
- package/build/npm/types/index.d.ts.map +1 -1
- package/build/npm/types/integrations/breadcrumbs.d.ts.map +1 -1
- package/build/npm/types/integrations/browserapierrors.d.ts.map +1 -1
- package/build/npm/types/integrations/featureFlags/featureFlagsIntegration.d.ts.map +1 -1
- package/build/npm/types/integrations/featureFlags/launchdarkly/integration.d.ts.map +1 -1
- package/build/npm/types/integrations/featureFlags/openfeature/integration.d.ts.map +1 -1
- package/build/npm/types/integrations/featureFlags/statsig/integration.d.ts.map +1 -1
- package/build/npm/types/integrations/featureFlags/unleash/integration.d.ts.map +1 -1
- package/build/npm/types/integrations/globalhandlers.d.ts.map +1 -1
- package/build/npm/types/integrations/graphqlClient.d.ts.map +1 -1
- package/build/npm/types/integrations/httpclient.d.ts.map +1 -1
- package/build/npm/types/integrations/spotlight.d.ts.map +1 -1
- package/build/npm/types/log.d.ts.map +1 -1
- package/build/npm/types/profiling/integration.d.ts.map +1 -1
- package/build/npm/types/profiling/startProfileForSpan.d.ts.map +1 -1
- package/build/npm/types/profiling/utils.d.ts.map +1 -1
- package/build/npm/types/stack-parsers.d.ts.map +1 -1
- package/build/npm/types/tracing/browserTracingIntegration.d.ts +20 -2
- package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -1
- package/build/npm/types/tracing/{previousTrace.d.ts → linkedTraces.d.ts} +24 -3
- package/build/npm/types/tracing/linkedTraces.d.ts.map +1 -0
- package/build/npm/types/tracing/request.d.ts.map +1 -1
- package/build/npm/types/transports/fetch.d.ts.map +1 -1
- package/build/npm/types/userfeedback.d.ts.map +1 -1
- package/build/npm/types/utils/featureFlags.d.ts.map +1 -1
- package/build/npm/types/utils/lazyLoadIntegration.d.ts.map +1 -1
- package/build/npm/types-ts3.8/helpers.d.ts +1 -0
- package/build/npm/types-ts3.8/index.bundle.feedback.d.ts +0 -1
- package/build/npm/types-ts3.8/index.bundle.tracing.replay.d.ts +1 -1
- package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +2 -2
- package/build/npm/types-ts3.8/index.d.ts +4 -4
- package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +20 -2
- package/build/npm/types-ts3.8/tracing/{previousTrace.d.ts → linkedTraces.d.ts} +24 -3
- package/package.json +7 -7
- package/build/npm/cjs/tracing/previousTrace.js +0 -122
- package/build/npm/cjs/tracing/previousTrace.js.map +0 -1
- package/build/npm/esm/tracing/previousTrace.js +0 -115
- package/build/npm/esm/tracing/previousTrace.js.map +0 -1
- package/build/npm/types/tracing/previousTrace.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.bundle.tracing.replay.feedback.d.ts","sourceRoot":"","sources":["../../../src/index.bundle.tracing.replay.feedback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.bundle.tracing.replay.feedback.d.ts","sourceRoot":"","sources":["../../../src/index.bundle.tracing.replay.feedback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAI3D,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EACL,aAAa,EACb,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,wBAAwB,IAAI,wBAAwB,EAAE,wBAAwB,IAAI,mBAAmB,EAAE,CAAC;AAEjH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { feedbackAsyncIntegration } from './feedbackAsync';
|
|
2
|
+
import { feedbackSyncIntegration } from './feedbackSync';
|
|
2
3
|
import * as logger from './log';
|
|
4
|
+
export * from './exports';
|
|
3
5
|
export { logger };
|
|
4
6
|
export { reportingObserverIntegration } from './integrations/reportingobserver';
|
|
5
7
|
export { httpClientIntegration } from './integrations/httpclient';
|
|
6
8
|
export { contextLinesIntegration } from './integrations/contextlines';
|
|
7
9
|
export { graphqlClientIntegration } from './integrations/graphqlClient';
|
|
8
|
-
export { captureConsoleIntegration, extraErrorDataIntegration, rewriteFramesIntegration,
|
|
10
|
+
export { captureConsoleIntegration, extraErrorDataIntegration, rewriteFramesIntegration, consoleLoggingIntegration, } from '@sentry/core';
|
|
9
11
|
export { replayIntegration, getReplay } from '@sentry-internal/replay';
|
|
10
12
|
export type { ReplayEventType, ReplayEventWithTime, ReplayBreadcrumbFrame, ReplayBreadcrumbFrameEvent, ReplayOptionFrameEvent, ReplayFrame, ReplayFrameEvent, ReplaySpanFrame, ReplaySpanFrameEvent, } from '@sentry-internal/replay';
|
|
11
13
|
export { replayCanvasIntegration } from '@sentry-internal/replay-canvas';
|
|
12
|
-
import { feedbackAsyncIntegration } from './feedbackAsync';
|
|
13
|
-
import { feedbackSyncIntegration } from './feedbackSync';
|
|
14
14
|
export { feedbackAsyncIntegration, feedbackSyncIntegration, feedbackSyncIntegration as feedbackIntegration };
|
|
15
15
|
export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
|
|
16
16
|
export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './tracing/request';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,OAAO,CAAC;AAEhC,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,EACL,yBAAyB,EACzB,yBAAyB,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B,EAAE,KAAK,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AACrH,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAC7G,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"AA0CA,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EACC,OAAO,GACP;QACE,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACvC,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACN,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd;AA4CD,eAAO,MAAM,sBAAsB,2FAA6C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserapierrors.d.ts","sourceRoot":"","sources":["../../../../src/integrations/browserapierrors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browserapierrors.d.ts","sourceRoot":"","sources":["../../../../src/integrations/browserapierrors.ts"],"names":[],"mappings":"AA0CA,UAAU,uBAAuB;IAC/B,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;CACjC;AA0CD;;GAEG;AACH,eAAO,MAAM,2BAA2B,gGAAkD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureFlagsIntegration.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/featureFlags/featureFlagsIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"featureFlagsIntegration.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/featureFlags/featureFlagsIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4B,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIzF,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,uBAAuB,wCAYQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/launchdarkly/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/launchdarkly/integration.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiC,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE1F;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,0CAQV,CAAC;AAE3B;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,2BAA2B,CAc9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/openfeature/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/openfeature/integration.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAErG,eAAO,MAAM,sBAAsB,0CAQT,CAAC;AAE3B;;GAEG;AACH,qBAAa,0BAA2B,YAAW,eAAe;IAChE;;OAEG;IACI,KAAK,CAAC,YAAY,EAAE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,IAAI;IAInH;;OAEG;IACI,KAAK,CAAC,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,SAAS,GAAG,IAAI;CAG3G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/statsig/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/statsig/integration.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,kBAAkB;uBAC+B,aAAa;wCAelD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/unleash/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/unleash/integration.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEjE,KAAK,yBAAyB,GAAG;IAC/B,sBAAsB,EAAE,kBAAkB,CAAC;CAC5C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,kBAAkB,2EAeN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"AAkBA,KAAK,oCAAoC,GAAG,SAAS,GAAG,sBAAsB,CAAC;AAE/E,KAAK,0BAA0B,GAAG,MAAM,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;AA6BxF,eAAO,MAAM,yBAAyB,mGAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphqlClient.d.ts","sourceRoot":"","sources":["../../../../src/integrations/graphqlClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphqlClient.d.ts","sourceRoot":"","sources":["../../../../src/integrations/graphqlClient.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAGzE,UAAU,oBAAoB;IAC5B,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACnC;AAED,yGAAyG;AACzG,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,UAAU,gBAAgB;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA2FD;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAczF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAuBjE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAgB3F;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,uEAA+C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpclient.d.ts","sourceRoot":"","sources":["../../../../src/integrations/httpclient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpclient.d.ts","sourceRoot":"","sources":["../../../../src/integrations/httpclient.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC;AAIhD,UAAU,iBAAiB;IACzB;;;;;;;OAOG;IACH,wBAAwB,EAAE,mBAAmB,EAAE,CAAC;IAEhD;;;;;;OAMG;IACH,oBAAoB,EAAE,iBAAiB,EAAE,CAAC;CAC3C;AAkBD;;GAEG;AACH,eAAO,MAAM,qBAAqB,0FAA4C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../../src/integrations/spotlight.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../../src/integrations/spotlight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,KAAK,EAAiB,MAAM,cAAc,CAAC;AAM3E,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAuDnD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,mGAA2C,CAAC;AAEpF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAS5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAoB,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAoB/E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAEvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAEvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,CAExF;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../src/profiling/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../src/profiling/integration.ts"],"names":[],"mappings":"AA4FA,eAAO,MAAM,2BAA2B,0CAAkD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startProfileForSpan.d.ts","sourceRoot":"","sources":["../../../../src/profiling/startProfileForSpan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"startProfileForSpan.d.ts","sourceRoot":"","sources":["../../../../src/profiling/startProfileForSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAOzC;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CA+HpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/profiling/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAchH,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/profiling/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAA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G;AACH,wBAAgB,kBAAkB,IAAI,cAAc,GAAG,SAAS,CAkC/D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAyDrD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,aAAa,GACnB,OAAO,GAAG,IAAI,CAMhB;AAMD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAMxF;AACD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAOxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-parsers.d.ts","sourceRoot":"","sources":["../../../src/stack-parsers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stack-parsers.d.ts","sourceRoot":"","sources":["../../../src/stack-parsers.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAc,eAAe,EAAqB,MAAM,cAAc,CAAC;AA4EnF,eAAO,MAAM,qBAAqB,EAAE,eAAwD,CAAC;AAoC7F,eAAO,MAAM,oBAAoB,EAAE,eAAyC,CAAC;AAY7E,eAAO,MAAM,oBAAoB,EAAE,eAAyC,CAAC;AAS7E,eAAO,MAAM,sBAAsB,EAAE,eAA6C,CAAC;AAUnF,eAAO,MAAM,sBAAsB,EAAE,eAA6C,CAAC;AAEnF,eAAO,MAAM,uBAAuB,mBAAgD,CAAC;AAErF,eAAO,MAAM,kBAAkB,oCAAgD,CAAC"}
|
|
@@ -102,12 +102,30 @@ export interface BrowserTracingOptions {
|
|
|
102
102
|
*
|
|
103
103
|
* - `'off'`: The previous trace data will not be stored or linked.
|
|
104
104
|
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
105
|
+
* You can also use {@link BrowserTracingOptions.consistentTraceSampling} to get
|
|
106
|
+
* consistent trace sampling of subsequent traces. Otherwise, by default, your
|
|
107
|
+
* `tracesSampleRate` or `tracesSampler` config significantly influences how often
|
|
108
|
+
* traces will be linked.
|
|
107
109
|
*
|
|
108
110
|
* @default 'in-memory' - see explanation above
|
|
109
111
|
*/
|
|
110
112
|
linkPreviousTrace: 'in-memory' | 'session-storage' | 'off';
|
|
113
|
+
/**
|
|
114
|
+
* If true, Sentry will consistently sample subsequent traces based on the
|
|
115
|
+
* sampling decision of the initial trace. For example, if the initial page
|
|
116
|
+
* load trace was sampled positively, all subsequent traces (e.g. navigations)
|
|
117
|
+
* are also sampled positively. In case the initial trace was sampled negatively,
|
|
118
|
+
* all subsequent traces are also sampled negatively.
|
|
119
|
+
*
|
|
120
|
+
* This option allows you to get consistent, linked traces within a user journey
|
|
121
|
+
* while maintaining an overall quota based on your trace sampling settings.
|
|
122
|
+
*
|
|
123
|
+
* This option is only effective if {@link BrowserTracingOptions.linkPreviousTrace}
|
|
124
|
+
* is enabled (i.e. not set to `'off'`).
|
|
125
|
+
*
|
|
126
|
+
* @default `false` - this is an opt-in feature.
|
|
127
|
+
*/
|
|
128
|
+
consistentTraceSampling: boolean;
|
|
111
129
|
/**
|
|
112
130
|
* _experiments allows the user to send options to define how this integration works.
|
|
113
131
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../../src/tracing/browserTracingIntegration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../../src/tracing/browserTracingIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAiB,IAAI,EAAE,gBAAgB,EAAqB,eAAe,EAAE,MAAM,cAAc,CAAC;AAuCtH,eAAO,MAAM,8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QAAE,OAAO,CAAC,EAAE,eAAe,CAAA;KAAE,GAAG,IAAI,CAAC;CAC1F;AAkBD;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,cAAe,QAAQ,qBAAqB,CAAC;;;CA4PzD,CAAC;AAE3B;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,gBAAgB,EAC7B,YAAY,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAChF,IAAI,GAAG,SAAS,CAKlB;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,CAMjH;AAED,sCAAsC;AACtC,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASnE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Span } from '@sentry/core';
|
|
1
|
+
import type { Client, PropagationContext, Span } from '@sentry/core';
|
|
2
2
|
import { type SpanContextData } from '@sentry/core';
|
|
3
3
|
export interface PreviousTraceInfo {
|
|
4
4
|
/**
|
|
@@ -9,10 +9,27 @@ export interface PreviousTraceInfo {
|
|
|
9
9
|
* Timestamp in seconds when the previous trace was started
|
|
10
10
|
*/
|
|
11
11
|
startTimestamp: number;
|
|
12
|
+
/**
|
|
13
|
+
* sample rate of the previous trace
|
|
14
|
+
*/
|
|
15
|
+
sampleRate: number;
|
|
16
|
+
/**
|
|
17
|
+
* The sample rand of the previous trace
|
|
18
|
+
*/
|
|
19
|
+
sampleRand: number;
|
|
12
20
|
}
|
|
13
21
|
export declare const PREVIOUS_TRACE_MAX_DURATION = 3600;
|
|
14
22
|
export declare const PREVIOUS_TRACE_KEY = "sentry_previous_trace";
|
|
15
23
|
export declare const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = "sentry.previous_trace";
|
|
24
|
+
/**
|
|
25
|
+
* Takes care of linking traces and applying the (consistent) sampling behavoiour based on the passed options
|
|
26
|
+
* @param options - options for linking traces and consistent trace sampling (@see BrowserTracingOptions)
|
|
27
|
+
* @param client - Sentry client
|
|
28
|
+
*/
|
|
29
|
+
export declare function linkTraces(client: Client, { linkPreviousTrace, consistentTraceSampling, }: {
|
|
30
|
+
linkPreviousTrace: 'session-storage' | 'in-memory';
|
|
31
|
+
consistentTraceSampling: boolean;
|
|
32
|
+
}): void;
|
|
16
33
|
/**
|
|
17
34
|
* Adds a previous_trace span link to the passed span if the passed
|
|
18
35
|
* previousTraceInfo is still valid.
|
|
@@ -20,7 +37,7 @@ export declare const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = "sentry.previous_trace"
|
|
|
20
37
|
* @returns the updated previous trace info (based on the current span/trace) to
|
|
21
38
|
* be used on the next call
|
|
22
39
|
*/
|
|
23
|
-
export declare function addPreviousTraceSpanLink(previousTraceInfo: PreviousTraceInfo | undefined, span: Span): PreviousTraceInfo;
|
|
40
|
+
export declare function addPreviousTraceSpanLink(previousTraceInfo: PreviousTraceInfo | undefined, span: Span, oldPropagationContext: PropagationContext): PreviousTraceInfo;
|
|
24
41
|
/**
|
|
25
42
|
* Stores @param previousTraceInfo in sessionStorage.
|
|
26
43
|
*/
|
|
@@ -29,4 +46,8 @@ export declare function storePreviousTraceInSessionStorage(previousTraceInfo: Pr
|
|
|
29
46
|
* Retrieves the previous trace from sessionStorage if available.
|
|
30
47
|
*/
|
|
31
48
|
export declare function getPreviousTraceFromSessionStorage(): PreviousTraceInfo | undefined;
|
|
32
|
-
|
|
49
|
+
/**
|
|
50
|
+
* see {@link import('@sentry/core').spanIsSampled}
|
|
51
|
+
*/
|
|
52
|
+
export declare function spanContextSampled(ctx: SpanContextData): boolean;
|
|
53
|
+
//# sourceMappingURL=linkedTraces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linkedTraces.d.ts","sourceRoot":"","sources":["../../../../src/tracing/linkedTraces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EACL,KAAK,eAAe,EAQrB,MAAM,cAAc,CAAC;AAItB,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,WAAW,EAAE,eAAe,CAAC;IAE7B;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAGhD,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAE1D,eAAO,MAAM,iCAAiC,0BAA0B,CAAC;AAEzE;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,EACE,iBAAiB,EACjB,uBAAuB,GACxB,EAAE;IACD,iBAAiB,EAAE,iBAAiB,GAAG,WAAW,CAAC;IACnD,uBAAuB,EAAE,OAAO,CAAC;CAClC,GACA,IAAI,CAoEN;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,EAChD,IAAI,EAAE,IAAI,EACV,qBAAqB,EAAE,kBAAkB,GACxC,iBAAiB,CAmEnB;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAO7F;AAED;;GAEG;AACH,wBAAgB,kCAAkC,IAAI,iBAAiB,GAAG,SAAS,CAQlF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAEhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/tracing/request.ts"],"names":[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BAAmB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,EAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAC1B,IAAI,GAAG,SAAS,CAwElB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/transports/fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/transports/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAkD,MAAM,cAAc,CAAC;AAG9F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,uBAAuB,EAChC,WAAW,GAAE,OAAO,MAAM,CAAC,KAAK,GAAG,SAA4C,GAC9E,SAAS,CAwDX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userfeedback.d.ts","sourceRoot":"","sources":["../../../src/userfeedback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"userfeedback.d.ts","sourceRoot":"","sources":["../../../src/userfeedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAoB,MAAM,cAAc,CAAC;AAG9G;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,YAAY,EACtB,EACE,QAAQ,EACR,MAAM,EACN,GAAG,GACJ,EAAE;IACD,QAAQ,EAAE,WAAW,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,GAAG,EAAE,aAAa,GAAG,SAAS,CAAC;CAChC,GACA,aAAa,CAef"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../../../src/utils/featureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../../../src/utils/featureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIvD;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAc7D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAE,MAAyB,GAAG,IAAI,CAOxG;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CA4B5G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lazyLoadIntegration.d.ts","sourceRoot":"","sources":["../../../../src/utils/lazyLoadIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMlD,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAiBpB,CAAC;AAMX;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,OAAO,wBAAwB,EAC3C,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,aAAa,CAAC,CAwDxB"}
|
|
@@ -21,6 +21,7 @@ export declare const WINDOW: {
|
|
|
21
21
|
id?: string | undefined;
|
|
22
22
|
} | undefined;
|
|
23
23
|
SENTRY_SDK_SOURCE?: import("@sentry/core").SdkSource | undefined;
|
|
24
|
+
_sentryClientToLogBufferMap?: WeakMap<import("@sentry/core").Client<import("@sentry/core").ClientOptions<import("@sentry/core").BaseTransportOptions>>, import("@sentry/core").SerializedLog[]> | undefined;
|
|
24
25
|
_sentryDebugIds?: Record<string, string> | undefined;
|
|
25
26
|
_sentryModuleMetadata?: Record<string, any> | undefined;
|
|
26
27
|
_sentryEsmLoaderHookRegistered?: boolean | undefined;
|
|
@@ -3,5 +3,4 @@ import { feedbackAsyncIntegration } from './feedbackAsync';
|
|
|
3
3
|
export * from './index.bundle.base';
|
|
4
4
|
export { getFeedback } from '@sentry-internal/feedback';
|
|
5
5
|
export { browserTracingIntegrationShim as browserTracingIntegration, feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration, replayIntegrationShim as replayIntegration, };
|
|
6
|
-
export { captureFeedback } from '@sentry/core';
|
|
7
6
|
//# sourceMappingURL=index.bundle.feedback.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims';
|
|
1
2
|
export * from './index.bundle.base';
|
|
2
3
|
export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement, } from '@sentry/core';
|
|
3
4
|
export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
|
|
4
|
-
import { feedbackIntegrationShim } from '@sentry-internal/integration-shims';
|
|
5
5
|
export { feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration };
|
|
6
6
|
export { replayIntegration, getReplay } from '@sentry-internal/replay';
|
|
7
7
|
//# sourceMappingURL=index.bundle.tracing.replay.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { feedbackAsyncIntegration } from './feedbackAsync';
|
|
1
2
|
export * from './index.bundle.base';
|
|
2
|
-
export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement,
|
|
3
|
+
export { getActiveSpan, getRootSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, withActiveSpan, getSpanDescendants, setMeasurement, } from '@sentry/core';
|
|
3
4
|
export { browserTracingIntegration, startBrowserTracingNavigationSpan, startBrowserTracingPageLoadSpan, } from './tracing/browserTracingIntegration';
|
|
4
|
-
import { feedbackAsyncIntegration } from './feedbackAsync';
|
|
5
5
|
export { getFeedback } from '@sentry-internal/feedback';
|
|
6
6
|
export { feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration };
|
|
7
7
|
export { replayIntegration, getReplay } from '@sentry-internal/replay';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import { feedbackAsyncIntegration } from './feedbackAsync';
|
|
2
|
+
import { feedbackSyncIntegration } from './feedbackSync';
|
|
2
3
|
import * as logger from './log';
|
|
4
|
+
export * from './exports';
|
|
3
5
|
export { logger };
|
|
4
6
|
export { reportingObserverIntegration } from './integrations/reportingobserver';
|
|
5
7
|
export { httpClientIntegration } from './integrations/httpclient';
|
|
6
8
|
export { contextLinesIntegration } from './integrations/contextlines';
|
|
7
9
|
export { graphqlClientIntegration } from './integrations/graphqlClient';
|
|
8
|
-
export { captureConsoleIntegration, extraErrorDataIntegration, rewriteFramesIntegration,
|
|
10
|
+
export { captureConsoleIntegration, extraErrorDataIntegration, rewriteFramesIntegration, consoleLoggingIntegration, } from '@sentry/core';
|
|
9
11
|
export { replayIntegration, getReplay } from '@sentry-internal/replay';
|
|
10
12
|
export { ReplayEventType, ReplayEventWithTime, ReplayBreadcrumbFrame, ReplayBreadcrumbFrameEvent, ReplayOptionFrameEvent, ReplayFrame, ReplayFrameEvent, ReplaySpanFrame, ReplaySpanFrameEvent, } from '@sentry-internal/replay';
|
|
11
13
|
export { replayCanvasIntegration } from '@sentry-internal/replay-canvas';
|
|
12
|
-
import { feedbackAsyncIntegration } from './feedbackAsync';
|
|
13
|
-
import { feedbackSyncIntegration } from './feedbackSync';
|
|
14
14
|
export { feedbackAsyncIntegration, feedbackSyncIntegration, feedbackSyncIntegration as feedbackIntegration };
|
|
15
15
|
export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
|
|
16
16
|
export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './tracing/request';
|
|
@@ -102,12 +102,30 @@ export interface BrowserTracingOptions {
|
|
|
102
102
|
*
|
|
103
103
|
* - `'off'`: The previous trace data will not be stored or linked.
|
|
104
104
|
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
105
|
+
* You can also use {@link BrowserTracingOptions.consistentTraceSampling} to get
|
|
106
|
+
* consistent trace sampling of subsequent traces. Otherwise, by default, your
|
|
107
|
+
* `tracesSampleRate` or `tracesSampler` config significantly influences how often
|
|
108
|
+
* traces will be linked.
|
|
107
109
|
*
|
|
108
110
|
* @default 'in-memory' - see explanation above
|
|
109
111
|
*/
|
|
110
112
|
linkPreviousTrace: 'in-memory' | 'session-storage' | 'off';
|
|
113
|
+
/**
|
|
114
|
+
* If true, Sentry will consistently sample subsequent traces based on the
|
|
115
|
+
* sampling decision of the initial trace. For example, if the initial page
|
|
116
|
+
* load trace was sampled positively, all subsequent traces (e.g. navigations)
|
|
117
|
+
* are also sampled positively. In case the initial trace was sampled negatively,
|
|
118
|
+
* all subsequent traces are also sampled negatively.
|
|
119
|
+
*
|
|
120
|
+
* This option allows you to get consistent, linked traces within a user journey
|
|
121
|
+
* while maintaining an overall quota based on your trace sampling settings.
|
|
122
|
+
*
|
|
123
|
+
* This option is only effective if {@link BrowserTracingOptions.linkPreviousTrace}
|
|
124
|
+
* is enabled (i.e. not set to `'off'`).
|
|
125
|
+
*
|
|
126
|
+
* @default `false` - this is an opt-in feature.
|
|
127
|
+
*/
|
|
128
|
+
consistentTraceSampling: boolean;
|
|
111
129
|
/**
|
|
112
130
|
* _experiments allows the user to send options to define how this integration works.
|
|
113
131
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Span } from '@sentry/core';
|
|
1
|
+
import { Client, PropagationContext, Span } from '@sentry/core';
|
|
2
2
|
import { SpanContextData } from '@sentry/core';
|
|
3
3
|
export interface PreviousTraceInfo {
|
|
4
4
|
/**
|
|
@@ -9,10 +9,27 @@ export interface PreviousTraceInfo {
|
|
|
9
9
|
* Timestamp in seconds when the previous trace was started
|
|
10
10
|
*/
|
|
11
11
|
startTimestamp: number;
|
|
12
|
+
/**
|
|
13
|
+
* sample rate of the previous trace
|
|
14
|
+
*/
|
|
15
|
+
sampleRate: number;
|
|
16
|
+
/**
|
|
17
|
+
* The sample rand of the previous trace
|
|
18
|
+
*/
|
|
19
|
+
sampleRand: number;
|
|
12
20
|
}
|
|
13
21
|
export declare const PREVIOUS_TRACE_MAX_DURATION = 3600;
|
|
14
22
|
export declare const PREVIOUS_TRACE_KEY = "sentry_previous_trace";
|
|
15
23
|
export declare const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = "sentry.previous_trace";
|
|
24
|
+
/**
|
|
25
|
+
* Takes care of linking traces and applying the (consistent) sampling behavoiour based on the passed options
|
|
26
|
+
* @param options - options for linking traces and consistent trace sampling (@see BrowserTracingOptions)
|
|
27
|
+
* @param client - Sentry client
|
|
28
|
+
*/
|
|
29
|
+
export declare function linkTraces(client: Client, { linkPreviousTrace, consistentTraceSampling, }: {
|
|
30
|
+
linkPreviousTrace: 'session-storage' | 'in-memory';
|
|
31
|
+
consistentTraceSampling: boolean;
|
|
32
|
+
}): void;
|
|
16
33
|
/**
|
|
17
34
|
* Adds a previous_trace span link to the passed span if the passed
|
|
18
35
|
* previousTraceInfo is still valid.
|
|
@@ -20,7 +37,7 @@ export declare const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = "sentry.previous_trace"
|
|
|
20
37
|
* @returns the updated previous trace info (based on the current span/trace) to
|
|
21
38
|
* be used on the next call
|
|
22
39
|
*/
|
|
23
|
-
export declare function addPreviousTraceSpanLink(previousTraceInfo: PreviousTraceInfo | undefined, span: Span): PreviousTraceInfo;
|
|
40
|
+
export declare function addPreviousTraceSpanLink(previousTraceInfo: PreviousTraceInfo | undefined, span: Span, oldPropagationContext: PropagationContext): PreviousTraceInfo;
|
|
24
41
|
/**
|
|
25
42
|
* Stores @param previousTraceInfo in sessionStorage.
|
|
26
43
|
*/
|
|
@@ -29,4 +46,8 @@ export declare function storePreviousTraceInSessionStorage(previousTraceInfo: Pr
|
|
|
29
46
|
* Retrieves the previous trace from sessionStorage if available.
|
|
30
47
|
*/
|
|
31
48
|
export declare function getPreviousTraceFromSessionStorage(): PreviousTraceInfo | undefined;
|
|
32
|
-
|
|
49
|
+
/**
|
|
50
|
+
* see {@link import('@sentry/core').spanIsSampled}
|
|
51
|
+
*/
|
|
52
|
+
export declare function spanContextSampled(ctx: SpanContextData): boolean;
|
|
53
|
+
//# sourceMappingURL=linkedTraces.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/browser",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.16.0",
|
|
4
4
|
"description": "Official Sentry SDK for browsers",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@sentry-internal/browser-utils": "9.
|
|
43
|
-
"@sentry-internal/feedback": "9.
|
|
44
|
-
"@sentry-internal/replay": "9.
|
|
45
|
-
"@sentry-internal/replay-canvas": "9.
|
|
46
|
-
"@sentry/core": "9.
|
|
42
|
+
"@sentry-internal/browser-utils": "9.16.0",
|
|
43
|
+
"@sentry-internal/feedback": "9.16.0",
|
|
44
|
+
"@sentry-internal/replay": "9.16.0",
|
|
45
|
+
"@sentry-internal/replay-canvas": "9.16.0",
|
|
46
|
+
"@sentry/core": "9.16.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@sentry-internal/integration-shims": "9.
|
|
49
|
+
"@sentry-internal/integration-shims": "9.16.0",
|
|
50
50
|
"fake-indexeddb": "^4.0.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
|
-
const helpers = require('../helpers.js');
|
|
5
|
-
require('@sentry-internal/browser-utils');
|
|
6
|
-
require('../stack-parsers.js');
|
|
7
|
-
const debugBuild = require('../debug-build.js');
|
|
8
|
-
require('../integrations/breadcrumbs.js');
|
|
9
|
-
require('../integrations/browserapierrors.js');
|
|
10
|
-
require('../integrations/browsersession.js');
|
|
11
|
-
require('../integrations/globalhandlers.js');
|
|
12
|
-
require('../integrations/httpcontext.js');
|
|
13
|
-
require('../integrations/linkederrors.js');
|
|
14
|
-
|
|
15
|
-
// 1h in seconds
|
|
16
|
-
const PREVIOUS_TRACE_MAX_DURATION = 3600;
|
|
17
|
-
|
|
18
|
-
// session storage key
|
|
19
|
-
const PREVIOUS_TRACE_KEY = 'sentry_previous_trace';
|
|
20
|
-
|
|
21
|
-
const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = 'sentry.previous_trace';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Adds a previous_trace span link to the passed span if the passed
|
|
25
|
-
* previousTraceInfo is still valid.
|
|
26
|
-
*
|
|
27
|
-
* @returns the updated previous trace info (based on the current span/trace) to
|
|
28
|
-
* be used on the next call
|
|
29
|
-
*/
|
|
30
|
-
function addPreviousTraceSpanLink(
|
|
31
|
-
previousTraceInfo,
|
|
32
|
-
span,
|
|
33
|
-
) {
|
|
34
|
-
const spanJson = core.spanToJSON(span);
|
|
35
|
-
|
|
36
|
-
if (!previousTraceInfo) {
|
|
37
|
-
return {
|
|
38
|
-
spanContext: span.spanContext(),
|
|
39
|
-
startTimestamp: spanJson.start_timestamp,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const previousTraceSpanCtx = previousTraceInfo.spanContext;
|
|
44
|
-
if (previousTraceSpanCtx.traceId === spanJson.trace_id) {
|
|
45
|
-
// This means, we're still in the same trace so let's not update the previous trace info
|
|
46
|
-
// or add a link to the current span.
|
|
47
|
-
// Once we move away from the long-lived, route-based trace model, we can remove this cases
|
|
48
|
-
return previousTraceInfo;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Only add the link if the startTimeStamp of the previous trace's root span is within
|
|
52
|
-
// PREVIOUS_TRACE_MAX_DURATION (1h) of the current root span's startTimestamp
|
|
53
|
-
// This is done to
|
|
54
|
-
// - avoid adding links to "stale" traces
|
|
55
|
-
// - enable more efficient querying for previous/next traces in Sentry
|
|
56
|
-
if (Date.now() / 1000 - previousTraceInfo.startTimestamp <= PREVIOUS_TRACE_MAX_DURATION) {
|
|
57
|
-
if (debugBuild.DEBUG_BUILD) {
|
|
58
|
-
core.logger.info(
|
|
59
|
-
`Adding previous_trace ${previousTraceSpanCtx} link to span ${{
|
|
60
|
-
op: spanJson.op,
|
|
61
|
-
...span.spanContext(),
|
|
62
|
-
}}`,
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
span.addLink({
|
|
67
|
-
context: previousTraceSpanCtx,
|
|
68
|
-
attributes: {
|
|
69
|
-
[core.SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE]: 'previous_trace',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// TODO: Remove this once EAP can store span links. We currently only set this attribute so that we
|
|
74
|
-
// can obtain the previous trace information from the EAP store. Long-term, EAP will handle
|
|
75
|
-
// span links and then we should remove this again. Also throwing in a TODO(v10), to remind us
|
|
76
|
-
// to check this at v10 time :)
|
|
77
|
-
span.setAttribute(
|
|
78
|
-
PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE,
|
|
79
|
-
`${previousTraceSpanCtx.traceId}-${previousTraceSpanCtx.spanId}-${
|
|
80
|
-
previousTraceSpanCtx.traceFlags === 0x1 ? 1 : 0
|
|
81
|
-
}`,
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
spanContext: span.spanContext(),
|
|
87
|
-
startTimestamp: core.spanToJSON(span).start_timestamp,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Stores @param previousTraceInfo in sessionStorage.
|
|
93
|
-
*/
|
|
94
|
-
function storePreviousTraceInSessionStorage(previousTraceInfo) {
|
|
95
|
-
try {
|
|
96
|
-
helpers.WINDOW.sessionStorage.setItem(PREVIOUS_TRACE_KEY, JSON.stringify(previousTraceInfo));
|
|
97
|
-
} catch (e) {
|
|
98
|
-
// Ignore potential errors (e.g. if sessionStorage is not available)
|
|
99
|
-
debugBuild.DEBUG_BUILD && core.logger.warn('Could not store previous trace in sessionStorage', e);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Retrieves the previous trace from sessionStorage if available.
|
|
105
|
-
*/
|
|
106
|
-
function getPreviousTraceFromSessionStorage() {
|
|
107
|
-
try {
|
|
108
|
-
const previousTraceInfo = helpers.WINDOW.sessionStorage?.getItem(PREVIOUS_TRACE_KEY);
|
|
109
|
-
// @ts-expect-error - intentionally risking JSON.parse throwing when previousTraceInfo is null to save bundle size
|
|
110
|
-
return JSON.parse(previousTraceInfo);
|
|
111
|
-
} catch (e) {
|
|
112
|
-
return undefined;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
exports.PREVIOUS_TRACE_KEY = PREVIOUS_TRACE_KEY;
|
|
117
|
-
exports.PREVIOUS_TRACE_MAX_DURATION = PREVIOUS_TRACE_MAX_DURATION;
|
|
118
|
-
exports.PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE;
|
|
119
|
-
exports.addPreviousTraceSpanLink = addPreviousTraceSpanLink;
|
|
120
|
-
exports.getPreviousTraceFromSessionStorage = getPreviousTraceFromSessionStorage;
|
|
121
|
-
exports.storePreviousTraceInSessionStorage = storePreviousTraceInSessionStorage;
|
|
122
|
-
//# sourceMappingURL=previousTrace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"previousTrace.js","sources":["../../../../src/tracing/previousTrace.ts"],"sourcesContent":["import type { Span } from '@sentry/core';\nimport { logger, SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE, spanToJSON, type SpanContextData } from '@sentry/core';\nimport { WINDOW } from '../exports';\nimport { DEBUG_BUILD } from '../debug-build';\n\nexport interface PreviousTraceInfo {\n /**\n * Span context of the previous trace's local root span\n */\n spanContext: SpanContextData;\n\n /**\n * Timestamp in seconds when the previous trace was started\n */\n startTimestamp: number;\n}\n\n// 1h in seconds\nexport const PREVIOUS_TRACE_MAX_DURATION = 3600;\n\n// session storage key\nexport const PREVIOUS_TRACE_KEY = 'sentry_previous_trace';\n\nexport const PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE = 'sentry.previous_trace';\n\n/**\n * Adds a previous_trace span link to the passed span if the passed\n * previousTraceInfo is still valid.\n *\n * @returns the updated previous trace info (based on the current span/trace) to\n * be used on the next call\n */\nexport function addPreviousTraceSpanLink(\n previousTraceInfo: PreviousTraceInfo | undefined,\n span: Span,\n): PreviousTraceInfo {\n const spanJson = spanToJSON(span);\n\n if (!previousTraceInfo) {\n return {\n spanContext: span.spanContext(),\n startTimestamp: spanJson.start_timestamp,\n };\n }\n\n const previousTraceSpanCtx = previousTraceInfo.spanContext;\n if (previousTraceSpanCtx.traceId === spanJson.trace_id) {\n // This means, we're still in the same trace so let's not update the previous trace info\n // or add a link to the current span.\n // Once we move away from the long-lived, route-based trace model, we can remove this cases\n return previousTraceInfo;\n }\n\n // Only add the link if the startTimeStamp of the previous trace's root span is within\n // PREVIOUS_TRACE_MAX_DURATION (1h) of the current root span's startTimestamp\n // This is done to\n // - avoid adding links to \"stale\" traces\n // - enable more efficient querying for previous/next traces in Sentry\n if (Date.now() / 1000 - previousTraceInfo.startTimestamp <= PREVIOUS_TRACE_MAX_DURATION) {\n if (DEBUG_BUILD) {\n logger.info(\n `Adding previous_trace ${previousTraceSpanCtx} link to span ${{\n op: spanJson.op,\n ...span.spanContext(),\n }}`,\n );\n }\n\n span.addLink({\n context: previousTraceSpanCtx,\n attributes: {\n [SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE]: 'previous_trace',\n },\n });\n\n // TODO: Remove this once EAP can store span links. We currently only set this attribute so that we\n // can obtain the previous trace information from the EAP store. Long-term, EAP will handle\n // span links and then we should remove this again. Also throwing in a TODO(v10), to remind us\n // to check this at v10 time :)\n span.setAttribute(\n PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE,\n `${previousTraceSpanCtx.traceId}-${previousTraceSpanCtx.spanId}-${\n previousTraceSpanCtx.traceFlags === 0x1 ? 1 : 0\n }`,\n );\n }\n\n return {\n spanContext: span.spanContext(),\n startTimestamp: spanToJSON(span).start_timestamp,\n };\n}\n\n/**\n * Stores @param previousTraceInfo in sessionStorage.\n */\nexport function storePreviousTraceInSessionStorage(previousTraceInfo: PreviousTraceInfo): void {\n try {\n WINDOW.sessionStorage.setItem(PREVIOUS_TRACE_KEY, JSON.stringify(previousTraceInfo));\n } catch (e) {\n // Ignore potential errors (e.g. if sessionStorage is not available)\n DEBUG_BUILD && logger.warn('Could not store previous trace in sessionStorage', e);\n }\n}\n\n/**\n * Retrieves the previous trace from sessionStorage if available.\n */\nexport function getPreviousTraceFromSessionStorage(): PreviousTraceInfo | undefined {\n try {\n const previousTraceInfo = WINDOW.sessionStorage?.getItem(PREVIOUS_TRACE_KEY);\n // @ts-expect-error - intentionally risking JSON.parse throwing when previousTraceInfo is null to save bundle size\n return JSON.parse(previousTraceInfo);\n } catch (e) {\n return undefined;\n }\n}\n"],"names":["spanToJSON","DEBUG_BUILD","logger","SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE","WINDOW"],"mappings":";;;;;;;;;;;;;;AAiBA;AACO,MAAM,2BAA4B,GAAE;;AAE3C;AACO,MAAM,kBAAmB,GAAE;;AAE3B,MAAM,iCAAkC,GAAE;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB;AACxC,EAAE,iBAAiB;AACnB,EAAE,IAAI;AACN,EAAqB;AACrB,EAAE,MAAM,QAAS,GAAEA,eAAU,CAAC,IAAI,CAAC;;AAEnC,EAAE,IAAI,CAAC,iBAAiB,EAAE;AAC1B,IAAI,OAAO;AACX,MAAM,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE;AACrC,MAAM,cAAc,EAAE,QAAQ,CAAC,eAAe;AAC9C,KAAK;AACL;;AAEA,EAAE,MAAM,oBAAA,GAAuB,iBAAiB,CAAC,WAAW;AAC5D,EAAE,IAAI,oBAAoB,CAAC,YAAY,QAAQ,CAAC,QAAQ,EAAE;AAC1D;AACA;AACA;AACA,IAAI,OAAO,iBAAiB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE,IAAI,IAAI,CAAC,GAAG,EAAC,GAAI,IAAA,GAAO,iBAAiB,CAAC,cAAe,IAAG,2BAA2B,EAAE;AAC3F,IAAI,IAAIC,sBAAW,EAAE;AACrB,MAAMC,WAAM,CAAC,IAAI;AACjB,QAAQ,CAAC,sBAAsB,EAAE,oBAAoB,CAAC,cAAc,EAAE;AACtE,UAAU,EAAE,EAAE,QAAQ,CAAC,EAAE;AACz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