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

package.build.esm.utils.hasTracingEnabled.js.map Maven / Gradle / Ivy

There is a newer version: 8.39.0
Show newest version
{"version":3,"file":"hasTracingEnabled.js","sources":["../../../src/utils/hasTracingEnabled.ts"],"sourcesContent":["import type { Options } from '@sentry/types';\nimport { getClient } from '../currentScopes';\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean | undefined;\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nexport function hasTracingEnabled(\n  maybeOptions?: Pick | undefined,\n): boolean {\n  if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n    return false;\n  }\n\n  const client = getClient();\n  const options = maybeOptions || (client && client.getOptions());\n  // eslint-disable-next-line deprecation/deprecation\n  return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n"],"names":[],"mappings":";;AAGA;;AAGA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB;AACjC,EAAE,YAAY;AACd,EAAW;AACX,EAAE,IAAI,OAAO,kBAAA,KAAuB,SAAU,IAAG,CAAC,kBAAkB,EAAE;AACtE,IAAI,OAAO,KAAK,CAAA;AAChB,GAAE;AACF;AACA,EAAE,MAAM,MAAA,GAAS,SAAS,EAAE,CAAA;AAC5B,EAAE,MAAM,OAAA,GAAU,YAAA,KAAiB,MAAO,IAAG,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;AACjE;AACA,EAAE,OAAO,CAAC,CAAC,OAAQ,KAAI,OAAO,CAAC,aAAc,IAAG,sBAAsB,OAAA,IAAW,eAAgB,IAAG,OAAO,CAAC,CAAA;AAC5G;;;;"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy