All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.cjs.utils.spanOnScope.js.map Maven / Gradle / Ivy

There is a newer version: 8.39.0
Show newest version
{"version":3,"file":"spanOnScope.js","sources":["../../../src/utils/spanOnScope.ts"],"sourcesContent":["import type { Scope, Span } from '@sentry/types';\nimport { addNonEnumerableProperty } from '@sentry/utils';\n\nconst SCOPE_SPAN_FIELD = '_sentrySpan';\n\ntype ScopeWithMaybeSpan = Scope & {\n  [SCOPE_SPAN_FIELD]?: Span;\n};\n\n/**\n * Set the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _setSpanForScope(scope: Scope, span: Span | undefined): void {\n  if (span) {\n    addNonEnumerableProperty(scope as ScopeWithMaybeSpan, SCOPE_SPAN_FIELD, span);\n  } else {\n    // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n    delete (scope as ScopeWithMaybeSpan)[SCOPE_SPAN_FIELD];\n  }\n}\n\n/**\n * Get the active span for a given scope.\n * NOTE: This should NOT be used directly, but is only used internally by the trace methods.\n */\nexport function _getSpanForScope(scope: ScopeWithMaybeSpan): Span | undefined {\n  return scope[SCOPE_SPAN_FIELD];\n}\n"],"names":["addNonEnumerableProperty"],"mappings":";;;;AAGA,MAAM,gBAAA,GAAmB,aAAa,CAAA;;AAMtC;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,KAAK,EAAS,IAAI,EAA0B;AAC7E,EAAE,IAAI,IAAI,EAAE;AACZ,IAAIA,8BAAwB,CAAC,KAAA,GAA6B,gBAAgB,EAAE,IAAI,CAAC,CAAA;AACjF,SAAS;AACT;AACA,IAAI,OAAO,CAAC,KAAA,GAA6B,gBAAgB,CAAC,CAAA;AAC1D,GAAE;AACF,CAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,KAAK,EAAwC;AAC9E,EAAE,OAAO,KAAK,CAAC,gBAAgB,CAAC,CAAA;AAChC;;;;;"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy