@slicemachine/manager 0.26.3-beta.1 → 0.26.3-beta.3
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/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.cjs +6 -6
- package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.js +4 -4
- package/dist/_node_modules/@amplitude/analytics-node/lib/esm/transports/http.js.map +1 -1
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs +4 -4
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.cjs.map +1 -1
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js +4 -4
- package/dist/_node_modules/@amplitude/experiment-node-server/dist/src/transport/http.js.map +1 -1
- package/dist/errors.cjs +7 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +5 -1
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/managers/customTypes/CustomTypesManager.cjs +17 -7
- package/dist/managers/customTypes/CustomTypesManager.cjs.map +1 -1
- package/dist/managers/customTypes/CustomTypesManager.js +19 -9
- package/dist/managers/customTypes/CustomTypesManager.js.map +1 -1
- package/package.json +2 -2
- package/src/errors.ts +12 -1
- package/src/index.ts +1 -0
- package/src/managers/customTypes/CustomTypesManager.ts +29 -18
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.cjs +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.js +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/constants.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.cjs +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.js +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/debug-build.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs +0 -29
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js +0 -29
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/eventProcessors.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs +0 -17
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js +0 -17
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/exports.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs +0 -535
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js +0 -535
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/hub.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs +0 -545
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js +0 -545
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/scope.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs +0 -109
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js +0 -109
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/session.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs +0 -50
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js +0 -50
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs +0 -85
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js +0 -85
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.cjs +0 -7
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.js +0 -7
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/getRootSpan.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs +0 -35
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js +0 -35
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/prepareEvent.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs +0 -39
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js +0 -39
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/utils/spanUtils.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.cjs +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.js +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/core/esm/version.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.cjs +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.js +0 -5
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/debug-build.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs +0 -15
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js +0 -15
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/is.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs +0 -69
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js +0 -69
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/logger.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs +0 -34
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js +0 -34
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/misc.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs +0 -49
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js +0 -49
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/object.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs +0 -142
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js +0 -142
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/syncpromise.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs +0 -45
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js +0 -45
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/time.js.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs +0 -18
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.cjs.map +0 -1
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js +0 -18
- package/dist/_node_modules/@sentry/node/_node_modules/@sentry/utils/esm/worldwide.js.map +0 -1
- package/dist/lib/checkIsSentryEnabled.d.ts +0 -9
- package/dist/lib/sentryErrorHandlers.cjs +0 -10
- package/dist/lib/sentryErrorHandlers.cjs.map +0 -1
- package/dist/lib/sentryErrorHandlers.d.ts +0 -1
- package/dist/lib/sentryErrorHandlers.js +0 -10
- package/dist/lib/sentryErrorHandlers.js.map +0 -1
- package/src/lib/checkIsSentryEnabled.ts +0 -12
- package/src/lib/sentryErrorHandlers.ts +0 -13
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hub.js","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/hub.js"],"sourcesContent":["import { isThenable, uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { DEBUG_BUILD } from './debug-build.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\nimport { SDK_VERSION } from './version.js';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = parseFloat(SDK_VERSION);\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @deprecated The `Hub` class will be removed in version 8 of the SDK in favour of `Scope` and `Client` objects.\n *\n * If you previously used the `Hub` class directly, replace it with `Scope` and `Client` objects. More information:\n * - [Multiple Sentry Instances](https://docs.sentry.io/platforms/javascript/best-practices/multiple-sentry-instances/)\n * - [Browser Extensions](https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/)\n *\n * Some of our APIs are typed with the Hub class instead of the interface (e.g. `getCurrentHub`). Most of them are deprecated\n * themselves and will also be removed in version 8. More information:\n * - [Migration Guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub)\n */\n// eslint-disable-next-line deprecation/deprecation\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n *\n * @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK.\n *\n * If you are currently using the Hub for multi-client use like so:\n *\n * ```\n * // OLD\n * const hub = new Hub();\n * hub.bindClient(client);\n * makeMain(hub)\n * ```\n *\n * instead initialize the client as follows:\n *\n * ```\n * // NEW\n * Sentry.withIsolationScope(() => {\n * Sentry.setCurrentClient(client);\n * client.init();\n * });\n * ```\n *\n * If you are using the Hub to capture events like so:\n *\n * ```\n * // OLD\n * const client = new Client();\n * const hub = new Hub(client);\n * hub.captureException()\n * ```\n *\n * instead capture isolated events as follows:\n *\n * ```\n * // NEW\n * const client = new Client();\n * const scope = new Scope();\n * scope.setClient(client);\n * scope.captureException();\n * ```\n */\n constructor(\n client,\n scope,\n isolationScope,\n _version = API_VERSION,\n ) {this._version = _version;\n let assignedScope;\n if (!scope) {\n assignedScope = new Scope();\n assignedScope.setClient(client);\n } else {\n assignedScope = scope;\n }\n\n let assignedIsolationScope;\n if (!isolationScope) {\n assignedIsolationScope = new Scope();\n assignedIsolationScope.setClient(client);\n } else {\n assignedIsolationScope = isolationScope;\n }\n\n this._stack = [{ scope: assignedScope }];\n\n if (client) {\n // eslint-disable-next-line deprecation/deprecation\n this.bindClient(client);\n }\n\n this._isolationScope = assignedIsolationScope;\n }\n\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @deprecated This will be removed in v8.\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n *\n * @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead.\n */\n bindClient(client) {\n // eslint-disable-next-line deprecation/deprecation\n const top = this.getStackTop();\n top.client = client;\n top.scope.setClient(client);\n // eslint-disable-next-line deprecation/deprecation\n if (client && client.setupIntegrations) {\n // eslint-disable-next-line deprecation/deprecation\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n pushScope() {\n // We want to clone the content of prev scope\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.getScope().clone();\n // eslint-disable-next-line deprecation/deprecation\n this.getStack().push({\n // eslint-disable-next-line deprecation/deprecation\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `withScope` instead.\n */\n popScope() {\n // eslint-disable-next-line deprecation/deprecation\n if (this.getStack().length <= 1) return false;\n // eslint-disable-next-line deprecation/deprecation\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.withScope()` instead.\n */\n withScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const scope = this.pushScope();\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback(scope);\n } catch (e) {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n // @ts-expect-error - isThenable returns the wrong type\n return maybePromiseResult.then(\n res => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return res;\n },\n e => {\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n throw e;\n },\n );\n }\n\n // eslint-disable-next-line deprecation/deprecation\n this.popScope();\n return maybePromiseResult;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.getClient()` instead.\n */\n getClient() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().client ;\n }\n\n /**\n * Returns the scope of the top stack.\n *\n * @deprecated Use `Sentry.getCurrentScope()` instead.\n */\n getScope() {\n // eslint-disable-next-line deprecation/deprecation\n return this.getStackTop().scope;\n }\n\n /**\n * @deprecated Use `Sentry.getIsolationScope()` instead.\n */\n getIsolationScope() {\n return this._isolationScope;\n }\n\n /**\n * Returns the scope stack for domains or the process.\n * @deprecated This will be removed in v8.\n */\n getStack() {\n return this._stack;\n }\n\n /**\n * Returns the topmost scope layer in the order domain > local > process.\n * @deprecated This will be removed in v8.\n */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureException()` instead.\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureException(exception, {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureMessage()` instead.\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureMessage(message, level, {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n });\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.captureEvent()` instead.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().captureEvent(event, { ...hint, event_id: eventId });\n return eventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated This will be removed in v8.\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `Sentry.addBreadcrumb()` instead.\n */\n addBreadcrumb(breadcrumb, hint) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n // TODO(v8): I know this comment doesn't make much sense because the hub will be deprecated but I still wanted to\n // write it down. In theory, we would have to add the breadcrumbs to the isolation scope here, however, that would\n // duplicate all of the breadcrumbs. There was the possibility of adding breadcrumbs to both, the isolation scope\n // and the normal scope, and deduplicating it down the line in the event processing pipeline. However, that would\n // have been very fragile, because the breadcrumb objects would have needed to keep their identity all throughout\n // the event processing pipeline.\n // In the new implementation, the top level `Sentry.addBreadcrumb()` should ONLY write to the isolation scope.\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setUser()` instead.\n */\n setUser(user) {\n // TODO(v8): The top level `Sentry.setUser()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setUser(user);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTags()` instead.\n */\n setTags(tags) {\n // TODO(v8): The top level `Sentry.setTags()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTags(tags);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtras()` instead.\n */\n setExtras(extras) {\n // TODO(v8): The top level `Sentry.setExtras()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtras(extras);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setTag()` instead.\n */\n setTag(key, value) {\n // TODO(v8): The top level `Sentry.setTag()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setTag(key, value);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setExtra()` instead.\n */\n setExtra(key, extra) {\n // TODO(v8): The top level `Sentry.setExtra()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setExtra(key, extra);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.setContext()` instead.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n // TODO(v8): The top level `Sentry.setContext()` function should write ONLY to the isolation scope.\n // eslint-disable-next-line deprecation/deprecation\n this.getScope().setContext(name, context);\n // eslint-disable-next-line deprecation/deprecation\n this.getIsolationScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use `getScope()` directly.\n */\n configureScope(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line deprecation/deprecation\n run(callback) {\n // eslint-disable-next-line deprecation/deprecation\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n // eslint-disable-next-line deprecation/deprecation\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `Sentry.getClient().getIntegrationByName()` instead.\n */\n getIntegration(integration) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) return null;\n try {\n // eslint-disable-next-line deprecation/deprecation\n return client.getIntegration(integration);\n } catch (_oO) {\n DEBUG_BUILD && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n *\n * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead.\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if (DEBUG_BUILD && !result) {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n if (!client) {\n logger.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n logger.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `spanToTraceHeader()` instead.\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n *\n * @deprecated Use top level `captureSession` instead.\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n // eslint-disable-next-line deprecation/deprecation\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `endSession` instead.\n */\n endSession() {\n // eslint-disable-next-line deprecation/deprecation\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n * @deprecated Use top level `startSession` instead.\n */\n startSession(context) {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n // eslint-disable-next-line deprecation/deprecation\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n *\n * @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function\n * only unnecessarily increased API surface but only wrapped accessing the option.\n */\n shouldSendDefaultPii() {\n // eslint-disable-next-line deprecation/deprecation\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n // eslint-disable-next-line deprecation/deprecation\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n DEBUG_BUILD && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n *\n * @deprecated Use `setCurrentClient()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n *\n * @deprecated Use the respective replacement method directly instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\n/**\n * Get the currently active isolation scope.\n * The isolation scope is active for the current exection context,\n * meaning that it will remain stable for the same Hub.\n */\nfunction getIsolationScope() {\n // eslint-disable-next-line deprecation/deprecation\n return getCurrentHub().getIsolationScope();\n}\n\n// eslint-disable-next-line deprecation/deprecation\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n\n if (\n !hasHubOnCarrier(registry) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(registry).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (\n !hasHubOnCarrier(carrier) ||\n // eslint-disable-next-line deprecation/deprecation\n getHubFromCarrier(carrier).isOlderThan(API_VERSION)\n ) {\n // eslint-disable-next-line deprecation/deprecation\n const client = parent.getClient();\n // eslint-disable-next-line deprecation/deprecation\n const scope = parent.getScope();\n // eslint-disable-next-line deprecation/deprecation\n const isolationScope = parent.getIsolationScope();\n // eslint-disable-next-line deprecation/deprecation\n setHubOnCarrier(carrier, new Hub(client, scope.clone(), isolationScope.clone()));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction getHubFromCarrier(carrier) {\n // eslint-disable-next-line deprecation/deprecation\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\n// eslint-disable-next-line deprecation/deprecation\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getIsolationScope, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };\n//# sourceMappingURL=hub.js.map\n"],"names":[],"mappings":";;;;;;;;;;AAeK,MAAC,cAAc,WAAW,WAAW;AAM1C,MAAM,sBAAsB;AAc5B,MAAM,IAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqDR,YACC,QACA,OACA,gBACE,WAAW,aACb;AAAC,SAAK,WAAW;AACjB,QAAI;AACJ,QAAI,CAAC,OAAO;AACV,sBAAgB,IAAI,MAAK;AACzB,oBAAc,UAAU,MAAM;AAAA,IAChC,OAAO;AACL,sBAAgB;AAAA,IAClB;AAEA,QAAI;AACJ,QAAI,CAAC,gBAAgB;AACnB,+BAAyB,IAAI,MAAK;AAClC,6BAAuB,UAAU,MAAM;AAAA,IACzC,OAAO;AACL,+BAAyB;AAAA,IAC3B;AAEA,SAAK,SAAS,CAAC,EAAE,OAAO,cAAa,CAAE;AAEvC,QAAI,QAAQ;AAEV,WAAK,WAAW,MAAM;AAAA,IACxB;AAEA,SAAK,kBAAkB;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUC,YAAY,SAAS;AACpB,WAAO,KAAK,WAAW;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AA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G,GAAI,OAAO;AAC3D;AASA,SAAS,gBAAgB,SAAS,KAAK;AACrC,MAAI,CAAC,QAAS,QAAO;AACrB,QAAM,aAAc,QAAQ,aAAa,QAAQ,cAAc,CAAA;AAC/D,aAAW,MAAM;AACjB,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,545 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const eventProcessors = require("./eventProcessors.cjs");
|
|
4
|
-
const session = require("./session.cjs");
|
|
5
|
-
const applyScopeDataToEvent = require("./utils/applyScopeDataToEvent.cjs");
|
|
6
|
-
const is = require("../../utils/esm/is.cjs");
|
|
7
|
-
const time = require("../../utils/esm/time.cjs");
|
|
8
|
-
const misc = require("../../utils/esm/misc.cjs");
|
|
9
|
-
const logger = require("../../utils/esm/logger.cjs");
|
|
10
|
-
const DEFAULT_MAX_BREADCRUMBS = 100;
|
|
11
|
-
class Scope {
|
|
12
|
-
/** Flag if notifying is happening. */
|
|
13
|
-
/** Callback for client to receive scope changes. */
|
|
14
|
-
/** Callback list that will be called after {@link applyToEvent}. */
|
|
15
|
-
/** Array of breadcrumbs. */
|
|
16
|
-
/** User */
|
|
17
|
-
/** Tags */
|
|
18
|
-
/** Extra */
|
|
19
|
-
/** Contexts */
|
|
20
|
-
/** Attachments */
|
|
21
|
-
/** Propagation Context for distributed tracing */
|
|
22
|
-
/**
|
|
23
|
-
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
|
|
24
|
-
* sent to Sentry
|
|
25
|
-
*/
|
|
26
|
-
/** Fingerprint */
|
|
27
|
-
/** Severity */
|
|
28
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
29
|
-
/**
|
|
30
|
-
* Transaction Name
|
|
31
|
-
*/
|
|
32
|
-
/** Span */
|
|
33
|
-
/** Session */
|
|
34
|
-
/** Request Mode Session Status */
|
|
35
|
-
/** The client on this scope */
|
|
36
|
-
// NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
|
|
37
|
-
constructor() {
|
|
38
|
-
this._notifyingListeners = false;
|
|
39
|
-
this._scopeListeners = [];
|
|
40
|
-
this._eventProcessors = [];
|
|
41
|
-
this._breadcrumbs = [];
|
|
42
|
-
this._attachments = [];
|
|
43
|
-
this._user = {};
|
|
44
|
-
this._tags = {};
|
|
45
|
-
this._extra = {};
|
|
46
|
-
this._contexts = {};
|
|
47
|
-
this._sdkProcessingMetadata = {};
|
|
48
|
-
this._propagationContext = generatePropagationContext();
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Inherit values from the parent scope.
|
|
52
|
-
* @deprecated Use `scope.clone()` and `new Scope()` instead.
|
|
53
|
-
*/
|
|
54
|
-
static clone(scope) {
|
|
55
|
-
return scope ? scope.clone() : new Scope();
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Clone this scope instance.
|
|
59
|
-
*/
|
|
60
|
-
clone() {
|
|
61
|
-
const newScope = new Scope();
|
|
62
|
-
newScope._breadcrumbs = [...this._breadcrumbs];
|
|
63
|
-
newScope._tags = { ...this._tags };
|
|
64
|
-
newScope._extra = { ...this._extra };
|
|
65
|
-
newScope._contexts = { ...this._contexts };
|
|
66
|
-
newScope._user = this._user;
|
|
67
|
-
newScope._level = this._level;
|
|
68
|
-
newScope._span = this._span;
|
|
69
|
-
newScope._session = this._session;
|
|
70
|
-
newScope._transactionName = this._transactionName;
|
|
71
|
-
newScope._fingerprint = this._fingerprint;
|
|
72
|
-
newScope._eventProcessors = [...this._eventProcessors];
|
|
73
|
-
newScope._requestSession = this._requestSession;
|
|
74
|
-
newScope._attachments = [...this._attachments];
|
|
75
|
-
newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };
|
|
76
|
-
newScope._propagationContext = { ...this._propagationContext };
|
|
77
|
-
newScope._client = this._client;
|
|
78
|
-
return newScope;
|
|
79
|
-
}
|
|
80
|
-
/** Update the client on the scope. */
|
|
81
|
-
setClient(client) {
|
|
82
|
-
this._client = client;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Get the client assigned to this scope.
|
|
86
|
-
*
|
|
87
|
-
* It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.
|
|
88
|
-
*/
|
|
89
|
-
getClient() {
|
|
90
|
-
return this._client;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Add internal on change listener. Used for sub SDKs that need to store the scope.
|
|
94
|
-
* @hidden
|
|
95
|
-
*/
|
|
96
|
-
addScopeListener(callback) {
|
|
97
|
-
this._scopeListeners.push(callback);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @inheritDoc
|
|
101
|
-
*/
|
|
102
|
-
addEventProcessor(callback) {
|
|
103
|
-
this._eventProcessors.push(callback);
|
|
104
|
-
return this;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* @inheritDoc
|
|
108
|
-
*/
|
|
109
|
-
setUser(user) {
|
|
110
|
-
this._user = user || {
|
|
111
|
-
email: void 0,
|
|
112
|
-
id: void 0,
|
|
113
|
-
ip_address: void 0,
|
|
114
|
-
segment: void 0,
|
|
115
|
-
username: void 0
|
|
116
|
-
};
|
|
117
|
-
if (this._session) {
|
|
118
|
-
session.updateSession(this._session, { user });
|
|
119
|
-
}
|
|
120
|
-
this._notifyScopeListeners();
|
|
121
|
-
return this;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @inheritDoc
|
|
125
|
-
*/
|
|
126
|
-
getUser() {
|
|
127
|
-
return this._user;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @inheritDoc
|
|
131
|
-
*/
|
|
132
|
-
getRequestSession() {
|
|
133
|
-
return this._requestSession;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* @inheritDoc
|
|
137
|
-
*/
|
|
138
|
-
setRequestSession(requestSession) {
|
|
139
|
-
this._requestSession = requestSession;
|
|
140
|
-
return this;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* @inheritDoc
|
|
144
|
-
*/
|
|
145
|
-
setTags(tags) {
|
|
146
|
-
this._tags = {
|
|
147
|
-
...this._tags,
|
|
148
|
-
...tags
|
|
149
|
-
};
|
|
150
|
-
this._notifyScopeListeners();
|
|
151
|
-
return this;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* @inheritDoc
|
|
155
|
-
*/
|
|
156
|
-
setTag(key, value) {
|
|
157
|
-
this._tags = { ...this._tags, [key]: value };
|
|
158
|
-
this._notifyScopeListeners();
|
|
159
|
-
return this;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* @inheritDoc
|
|
163
|
-
*/
|
|
164
|
-
setExtras(extras) {
|
|
165
|
-
this._extra = {
|
|
166
|
-
...this._extra,
|
|
167
|
-
...extras
|
|
168
|
-
};
|
|
169
|
-
this._notifyScopeListeners();
|
|
170
|
-
return this;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* @inheritDoc
|
|
174
|
-
*/
|
|
175
|
-
setExtra(key, extra) {
|
|
176
|
-
this._extra = { ...this._extra, [key]: extra };
|
|
177
|
-
this._notifyScopeListeners();
|
|
178
|
-
return this;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* @inheritDoc
|
|
182
|
-
*/
|
|
183
|
-
setFingerprint(fingerprint) {
|
|
184
|
-
this._fingerprint = fingerprint;
|
|
185
|
-
this._notifyScopeListeners();
|
|
186
|
-
return this;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* @inheritDoc
|
|
190
|
-
*/
|
|
191
|
-
setLevel(level) {
|
|
192
|
-
this._level = level;
|
|
193
|
-
this._notifyScopeListeners();
|
|
194
|
-
return this;
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Sets the transaction name on the scope for future events.
|
|
198
|
-
*/
|
|
199
|
-
setTransactionName(name) {
|
|
200
|
-
this._transactionName = name;
|
|
201
|
-
this._notifyScopeListeners();
|
|
202
|
-
return this;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* @inheritDoc
|
|
206
|
-
*/
|
|
207
|
-
setContext(key, context) {
|
|
208
|
-
if (context === null) {
|
|
209
|
-
delete this._contexts[key];
|
|
210
|
-
} else {
|
|
211
|
-
this._contexts[key] = context;
|
|
212
|
-
}
|
|
213
|
-
this._notifyScopeListeners();
|
|
214
|
-
return this;
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Sets the Span on the scope.
|
|
218
|
-
* @param span Span
|
|
219
|
-
* @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.
|
|
220
|
-
*/
|
|
221
|
-
setSpan(span) {
|
|
222
|
-
this._span = span;
|
|
223
|
-
this._notifyScopeListeners();
|
|
224
|
-
return this;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Returns the `Span` if there is one.
|
|
228
|
-
* @deprecated Use `getActiveSpan()` instead.
|
|
229
|
-
*/
|
|
230
|
-
getSpan() {
|
|
231
|
-
return this._span;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Returns the `Transaction` attached to the scope (if there is one).
|
|
235
|
-
* @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.
|
|
236
|
-
*/
|
|
237
|
-
getTransaction() {
|
|
238
|
-
const span = this._span;
|
|
239
|
-
return span && span.transaction;
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* @inheritDoc
|
|
243
|
-
*/
|
|
244
|
-
setSession(session2) {
|
|
245
|
-
if (!session2) {
|
|
246
|
-
delete this._session;
|
|
247
|
-
} else {
|
|
248
|
-
this._session = session2;
|
|
249
|
-
}
|
|
250
|
-
this._notifyScopeListeners();
|
|
251
|
-
return this;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* @inheritDoc
|
|
255
|
-
*/
|
|
256
|
-
getSession() {
|
|
257
|
-
return this._session;
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* @inheritDoc
|
|
261
|
-
*/
|
|
262
|
-
update(captureContext) {
|
|
263
|
-
if (!captureContext) {
|
|
264
|
-
return this;
|
|
265
|
-
}
|
|
266
|
-
const scopeToMerge = typeof captureContext === "function" ? captureContext(this) : captureContext;
|
|
267
|
-
if (scopeToMerge instanceof Scope) {
|
|
268
|
-
const scopeData = scopeToMerge.getScopeData();
|
|
269
|
-
this._tags = { ...this._tags, ...scopeData.tags };
|
|
270
|
-
this._extra = { ...this._extra, ...scopeData.extra };
|
|
271
|
-
this._contexts = { ...this._contexts, ...scopeData.contexts };
|
|
272
|
-
if (scopeData.user && Object.keys(scopeData.user).length) {
|
|
273
|
-
this._user = scopeData.user;
|
|
274
|
-
}
|
|
275
|
-
if (scopeData.level) {
|
|
276
|
-
this._level = scopeData.level;
|
|
277
|
-
}
|
|
278
|
-
if (scopeData.fingerprint.length) {
|
|
279
|
-
this._fingerprint = scopeData.fingerprint;
|
|
280
|
-
}
|
|
281
|
-
if (scopeToMerge.getRequestSession()) {
|
|
282
|
-
this._requestSession = scopeToMerge.getRequestSession();
|
|
283
|
-
}
|
|
284
|
-
if (scopeData.propagationContext) {
|
|
285
|
-
this._propagationContext = scopeData.propagationContext;
|
|
286
|
-
}
|
|
287
|
-
} else if (is.isPlainObject(scopeToMerge)) {
|
|
288
|
-
const scopeContext = captureContext;
|
|
289
|
-
this._tags = { ...this._tags, ...scopeContext.tags };
|
|
290
|
-
this._extra = { ...this._extra, ...scopeContext.extra };
|
|
291
|
-
this._contexts = { ...this._contexts, ...scopeContext.contexts };
|
|
292
|
-
if (scopeContext.user) {
|
|
293
|
-
this._user = scopeContext.user;
|
|
294
|
-
}
|
|
295
|
-
if (scopeContext.level) {
|
|
296
|
-
this._level = scopeContext.level;
|
|
297
|
-
}
|
|
298
|
-
if (scopeContext.fingerprint) {
|
|
299
|
-
this._fingerprint = scopeContext.fingerprint;
|
|
300
|
-
}
|
|
301
|
-
if (scopeContext.requestSession) {
|
|
302
|
-
this._requestSession = scopeContext.requestSession;
|
|
303
|
-
}
|
|
304
|
-
if (scopeContext.propagationContext) {
|
|
305
|
-
this._propagationContext = scopeContext.propagationContext;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
return this;
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* @inheritDoc
|
|
312
|
-
*/
|
|
313
|
-
clear() {
|
|
314
|
-
this._breadcrumbs = [];
|
|
315
|
-
this._tags = {};
|
|
316
|
-
this._extra = {};
|
|
317
|
-
this._user = {};
|
|
318
|
-
this._contexts = {};
|
|
319
|
-
this._level = void 0;
|
|
320
|
-
this._transactionName = void 0;
|
|
321
|
-
this._fingerprint = void 0;
|
|
322
|
-
this._requestSession = void 0;
|
|
323
|
-
this._span = void 0;
|
|
324
|
-
this._session = void 0;
|
|
325
|
-
this._notifyScopeListeners();
|
|
326
|
-
this._attachments = [];
|
|
327
|
-
this._propagationContext = generatePropagationContext();
|
|
328
|
-
return this;
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* @inheritDoc
|
|
332
|
-
*/
|
|
333
|
-
addBreadcrumb(breadcrumb, maxBreadcrumbs) {
|
|
334
|
-
const maxCrumbs = typeof maxBreadcrumbs === "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;
|
|
335
|
-
if (maxCrumbs <= 0) {
|
|
336
|
-
return this;
|
|
337
|
-
}
|
|
338
|
-
const mergedBreadcrumb = {
|
|
339
|
-
timestamp: time.dateTimestampInSeconds(),
|
|
340
|
-
...breadcrumb
|
|
341
|
-
};
|
|
342
|
-
const breadcrumbs = this._breadcrumbs;
|
|
343
|
-
breadcrumbs.push(mergedBreadcrumb);
|
|
344
|
-
this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;
|
|
345
|
-
this._notifyScopeListeners();
|
|
346
|
-
return this;
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* @inheritDoc
|
|
350
|
-
*/
|
|
351
|
-
getLastBreadcrumb() {
|
|
352
|
-
return this._breadcrumbs[this._breadcrumbs.length - 1];
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* @inheritDoc
|
|
356
|
-
*/
|
|
357
|
-
clearBreadcrumbs() {
|
|
358
|
-
this._breadcrumbs = [];
|
|
359
|
-
this._notifyScopeListeners();
|
|
360
|
-
return this;
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* @inheritDoc
|
|
364
|
-
*/
|
|
365
|
-
addAttachment(attachment) {
|
|
366
|
-
this._attachments.push(attachment);
|
|
367
|
-
return this;
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* @inheritDoc
|
|
371
|
-
* @deprecated Use `getScopeData()` instead.
|
|
372
|
-
*/
|
|
373
|
-
getAttachments() {
|
|
374
|
-
const data = this.getScopeData();
|
|
375
|
-
return data.attachments;
|
|
376
|
-
}
|
|
377
|
-
/**
|
|
378
|
-
* @inheritDoc
|
|
379
|
-
*/
|
|
380
|
-
clearAttachments() {
|
|
381
|
-
this._attachments = [];
|
|
382
|
-
return this;
|
|
383
|
-
}
|
|
384
|
-
/** @inheritDoc */
|
|
385
|
-
getScopeData() {
|
|
386
|
-
const {
|
|
387
|
-
_breadcrumbs,
|
|
388
|
-
_attachments,
|
|
389
|
-
_contexts,
|
|
390
|
-
_tags,
|
|
391
|
-
_extra,
|
|
392
|
-
_user,
|
|
393
|
-
_level,
|
|
394
|
-
_fingerprint,
|
|
395
|
-
_eventProcessors,
|
|
396
|
-
_propagationContext,
|
|
397
|
-
_sdkProcessingMetadata,
|
|
398
|
-
_transactionName,
|
|
399
|
-
_span
|
|
400
|
-
} = this;
|
|
401
|
-
return {
|
|
402
|
-
breadcrumbs: _breadcrumbs,
|
|
403
|
-
attachments: _attachments,
|
|
404
|
-
contexts: _contexts,
|
|
405
|
-
tags: _tags,
|
|
406
|
-
extra: _extra,
|
|
407
|
-
user: _user,
|
|
408
|
-
level: _level,
|
|
409
|
-
fingerprint: _fingerprint || [],
|
|
410
|
-
eventProcessors: _eventProcessors,
|
|
411
|
-
propagationContext: _propagationContext,
|
|
412
|
-
sdkProcessingMetadata: _sdkProcessingMetadata,
|
|
413
|
-
transactionName: _transactionName,
|
|
414
|
-
span: _span
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Applies data from the scope to the event and runs all event processors on it.
|
|
419
|
-
*
|
|
420
|
-
* @param event Event
|
|
421
|
-
* @param hint Object containing additional information about the original exception, for use by the event processors.
|
|
422
|
-
* @hidden
|
|
423
|
-
* @deprecated Use `applyScopeDataToEvent()` directly
|
|
424
|
-
*/
|
|
425
|
-
applyToEvent(event, hint = {}, additionalEventProcessors = []) {
|
|
426
|
-
applyScopeDataToEvent.applyScopeDataToEvent(event, this.getScopeData());
|
|
427
|
-
const eventProcessors$1 = [
|
|
428
|
-
...additionalEventProcessors,
|
|
429
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
430
|
-
...eventProcessors.getGlobalEventProcessors(),
|
|
431
|
-
...this._eventProcessors
|
|
432
|
-
];
|
|
433
|
-
return eventProcessors.notifyEventProcessors(eventProcessors$1, event, hint);
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Add data which will be accessible during event processing but won't get sent to Sentry
|
|
437
|
-
*/
|
|
438
|
-
setSDKProcessingMetadata(newData) {
|
|
439
|
-
this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };
|
|
440
|
-
return this;
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* @inheritDoc
|
|
444
|
-
*/
|
|
445
|
-
setPropagationContext(context) {
|
|
446
|
-
this._propagationContext = context;
|
|
447
|
-
return this;
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* @inheritDoc
|
|
451
|
-
*/
|
|
452
|
-
getPropagationContext() {
|
|
453
|
-
return this._propagationContext;
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
* Capture an exception for this scope.
|
|
457
|
-
*
|
|
458
|
-
* @param exception The exception to capture.
|
|
459
|
-
* @param hint Optinal additional data to attach to the Sentry event.
|
|
460
|
-
* @returns the id of the captured Sentry event.
|
|
461
|
-
*/
|
|
462
|
-
captureException(exception, hint) {
|
|
463
|
-
const eventId = hint && hint.event_id ? hint.event_id : misc.uuid4();
|
|
464
|
-
if (!this._client) {
|
|
465
|
-
logger.logger.warn("No client configured on scope - will not capture exception!");
|
|
466
|
-
return eventId;
|
|
467
|
-
}
|
|
468
|
-
const syntheticException = new Error("Sentry syntheticException");
|
|
469
|
-
this._client.captureException(
|
|
470
|
-
exception,
|
|
471
|
-
{
|
|
472
|
-
originalException: exception,
|
|
473
|
-
syntheticException,
|
|
474
|
-
...hint,
|
|
475
|
-
event_id: eventId
|
|
476
|
-
},
|
|
477
|
-
this
|
|
478
|
-
);
|
|
479
|
-
return eventId;
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* Capture a message for this scope.
|
|
483
|
-
*
|
|
484
|
-
* @param message The message to capture.
|
|
485
|
-
* @param level An optional severity level to report the message with.
|
|
486
|
-
* @param hint Optional additional data to attach to the Sentry event.
|
|
487
|
-
* @returns the id of the captured message.
|
|
488
|
-
*/
|
|
489
|
-
captureMessage(message, level, hint) {
|
|
490
|
-
const eventId = hint && hint.event_id ? hint.event_id : misc.uuid4();
|
|
491
|
-
if (!this._client) {
|
|
492
|
-
logger.logger.warn("No client configured on scope - will not capture message!");
|
|
493
|
-
return eventId;
|
|
494
|
-
}
|
|
495
|
-
const syntheticException = new Error(message);
|
|
496
|
-
this._client.captureMessage(
|
|
497
|
-
message,
|
|
498
|
-
level,
|
|
499
|
-
{
|
|
500
|
-
originalException: message,
|
|
501
|
-
syntheticException,
|
|
502
|
-
...hint,
|
|
503
|
-
event_id: eventId
|
|
504
|
-
},
|
|
505
|
-
this
|
|
506
|
-
);
|
|
507
|
-
return eventId;
|
|
508
|
-
}
|
|
509
|
-
/**
|
|
510
|
-
* Captures a manually created event for this scope and sends it to Sentry.
|
|
511
|
-
*
|
|
512
|
-
* @param exception The event to capture.
|
|
513
|
-
* @param hint Optional additional data to attach to the Sentry event.
|
|
514
|
-
* @returns the id of the captured event.
|
|
515
|
-
*/
|
|
516
|
-
captureEvent(event, hint) {
|
|
517
|
-
const eventId = hint && hint.event_id ? hint.event_id : misc.uuid4();
|
|
518
|
-
if (!this._client) {
|
|
519
|
-
logger.logger.warn("No client configured on scope - will not capture event!");
|
|
520
|
-
return eventId;
|
|
521
|
-
}
|
|
522
|
-
this._client.captureEvent(event, { ...hint, event_id: eventId }, this);
|
|
523
|
-
return eventId;
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* This will be called on every set call.
|
|
527
|
-
*/
|
|
528
|
-
_notifyScopeListeners() {
|
|
529
|
-
if (!this._notifyingListeners) {
|
|
530
|
-
this._notifyingListeners = true;
|
|
531
|
-
this._scopeListeners.forEach((callback) => {
|
|
532
|
-
callback(this);
|
|
533
|
-
});
|
|
534
|
-
this._notifyingListeners = false;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
function generatePropagationContext() {
|
|
539
|
-
return {
|
|
540
|
-
traceId: misc.uuid4(),
|
|
541
|
-
spanId: misc.uuid4().substring(16)
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
exports.Scope = Scope;
|
|
545
|
-
//# sourceMappingURL=scope.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scope.cjs","sources":["../../../../../../../../../../node_modules/@sentry/node/node_modules/@sentry/core/esm/scope.js"],"sourcesContent":["import { isPlainObject, dateTimestampInSeconds, uuid4, logger } from '@sentry/utils';\nimport { getGlobalEventProcessors, notifyEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\nimport { applyScopeDataToEvent } from './utils/applyScopeDataToEvent.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * The global scope is kept in this module.\n * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present.\n */\nlet globalScope;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /**\n * Transaction Name\n */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n /** The client on this scope */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @deprecated Use `scope.clone()` and `new Scope()` instead.\n */\n static clone(scope) {\n return scope ? scope.clone() : new Scope();\n }\n\n /**\n * Clone this scope instance.\n */\n clone() {\n const newScope = new Scope();\n newScope._breadcrumbs = [...this._breadcrumbs];\n newScope._tags = { ...this._tags };\n newScope._extra = { ...this._extra };\n newScope._contexts = { ...this._contexts };\n newScope._user = this._user;\n newScope._level = this._level;\n newScope._span = this._span;\n newScope._session = this._session;\n newScope._transactionName = this._transactionName;\n newScope._fingerprint = this._fingerprint;\n newScope._eventProcessors = [...this._eventProcessors];\n newScope._requestSession = this._requestSession;\n newScope._attachments = [...this._attachments];\n newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata };\n newScope._propagationContext = { ...this._propagationContext };\n newScope._client = this._client;\n\n return newScope;\n }\n\n /** Update the client on the scope. */\n setClient(client) {\n this._client = client;\n }\n\n /**\n * Get the client assigned to this scope.\n *\n * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing.\n */\n getClient() {\n return this._client;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n // If null is passed we want to unset everything, but still define keys,\n // so that later down in the pipeline any existing values are cleared.\n this._user = user || {\n email: undefined,\n id: undefined,\n ip_address: undefined,\n segment: undefined,\n username: undefined,\n };\n\n if (this._session) {\n updateSession(this._session, { user });\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the transaction name on the scope for future events.\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Sets the Span on the scope.\n * @param span Span\n * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead.\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * Returns the `Span` if there is one.\n * @deprecated Use `getActiveSpan()` instead.\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * Returns the `Transaction` attached to the scope (if there is one).\n * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead.\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this._span;\n // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction\n // Also, this method will be removed anyway.\n // eslint-disable-next-line deprecation/deprecation\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext;\n\n if (scopeToMerge instanceof Scope) {\n const scopeData = scopeToMerge.getScopeData();\n\n this._tags = { ...this._tags, ...scopeData.tags };\n this._extra = { ...this._extra, ...scopeData.extra };\n this._contexts = { ...this._contexts, ...scopeData.contexts };\n if (scopeData.user && Object.keys(scopeData.user).length) {\n this._user = scopeData.user;\n }\n if (scopeData.level) {\n this._level = scopeData.level;\n }\n if (scopeData.fingerprint.length) {\n this._fingerprint = scopeData.fingerprint;\n }\n if (scopeToMerge.getRequestSession()) {\n this._requestSession = scopeToMerge.getRequestSession();\n }\n if (scopeData.propagationContext) {\n this._propagationContext = scopeData.propagationContext;\n }\n } else if (isPlainObject(scopeToMerge)) {\n const scopeContext = captureContext ;\n this._tags = { ...this._tags, ...scopeContext.tags };\n this._extra = { ...this._extra, ...scopeContext.extra };\n this._contexts = { ...this._contexts, ...scopeContext.contexts };\n if (scopeContext.user) {\n this._user = scopeContext.user;\n }\n if (scopeContext.level) {\n this._level = scopeContext.level;\n }\n if (scopeContext.fingerprint) {\n this._fingerprint = scopeContext.fingerprint;\n }\n if (scopeContext.requestSession) {\n this._requestSession = scopeContext.requestSession;\n }\n if (scopeContext.propagationContext) {\n this._propagationContext = scopeContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n * @deprecated Use `getScopeData()` instead.\n */\n getAttachments() {\n const data = this.getScopeData();\n\n return data.attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /** @inheritDoc */\n getScopeData() {\n const {\n _breadcrumbs,\n _attachments,\n _contexts,\n _tags,\n _extra,\n _user,\n _level,\n _fingerprint,\n _eventProcessors,\n _propagationContext,\n _sdkProcessingMetadata,\n _transactionName,\n _span,\n } = this;\n\n return {\n breadcrumbs: _breadcrumbs,\n attachments: _attachments,\n contexts: _contexts,\n tags: _tags,\n extra: _extra,\n user: _user,\n level: _level,\n fingerprint: _fingerprint || [],\n eventProcessors: _eventProcessors,\n propagationContext: _propagationContext,\n sdkProcessingMetadata: _sdkProcessingMetadata,\n transactionName: _transactionName,\n span: _span,\n };\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n * @deprecated Use `applyScopeDataToEvent()` directly\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors = [],\n ) {\n applyScopeDataToEvent(event, this.getScopeData());\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n const eventProcessors = [\n ...additionalEventProcessors,\n // eslint-disable-next-line deprecation/deprecation\n ...getGlobalEventProcessors(),\n ...this._eventProcessors,\n ];\n\n return notifyEventProcessors(eventProcessors, event, hint);\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Capture an exception for this scope.\n *\n * @param exception The exception to capture.\n * @param hint Optinal additional data to attach to the Sentry event.\n * @returns the id of the captured Sentry event.\n */\n captureException(exception, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture exception!');\n return eventId;\n }\n\n const syntheticException = new Error('Sentry syntheticException');\n\n this._client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Capture a message for this scope.\n *\n * @param message The message to capture.\n * @param level An optional severity level to report the message with.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured message.\n */\n captureMessage(message, level, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture message!');\n return eventId;\n }\n\n const syntheticException = new Error(message);\n\n this._client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n this,\n );\n\n return eventId;\n }\n\n /**\n * Captures a manually created event for this scope and sends it to Sentry.\n *\n * @param exception The event to capture.\n * @param hint Optional additional data to attach to the Sentry event.\n * @returns the id of the captured event.\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n\n if (!this._client) {\n logger.warn('No client configured on scope - will not capture event!');\n return eventId;\n }\n\n this._client.captureEvent(event, { ...hint, event_id: eventId }, this);\n\n return eventId;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n}\n\n/**\n * Get the global scope.\n * This scope is applied to _all_ events.\n */\nfunction getGlobalScope() {\n if (!globalScope) {\n globalScope = new Scope();\n }\n\n return globalScope;\n}\n\n/**\n * This is mainly needed for tests.\n * DO NOT USE this, as this is an internal API and subject to change.\n * @hidden\n */\nfunction setGlobalScope(scope) {\n globalScope = scope;\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope, getGlobalScope, setGlobalScope };\n//# sourceMappingURL=scope.js.map\n"],"names":["updateSession","session","isPlainObject","dateTimestampInSeconds","applyScopeDataToEvent","eventProcessors","getGlobalEventProcessors","notifyEventProcessors","uuid4","logger"],"mappings":";;;;;;;;;AAQA,MAAM,0BAA0B;AAYhC,MAAM,MAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6CV,cAAc;AACb,SAAK,sBAAsB;AAC3B,SAAK,kBAAkB,CAAA;AACvB,SAAK,mBAAmB,CAAA;AACxB,SAAK,eAAe,CAAA;AACpB,SAAK,eAAe,CAAA;AACpB,SAAK,QAAQ,CAAA;AACb,SAAK,QAAQ,CAAA;AACb,SAAK,SAAS,CAAA;AACd,SAAK,YAAY,CAAA;AACjB,SAAK,yBAAyB,CAAA;AAC9B,SAAK,sBAAsB,2BAA0B;AAAA,EACvD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMC,OAAO,MAAM,OAAO;AACnB,WAAO,QAAQ,MAAM,MAAK,IAAK,IAAI,MAAK;AAAA,EAC1C;AAAA;AAAA;AAAA;AAAA,EAKC,QAAQ;AACP,UAAM,WAAW,IAAI,MAAK;AAC1B,aAAS,eAAe,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