Files
klz-cables.com/.pnpm-store/v10/files/11/3f978db53e15c0d9b514d7d7863350d8effa83b21524c0d6aa84a99737858889a689837f0b3e0f10278e33d50b9c68b9f32d91dde2c133980c8c56fb0741fb
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

40 lines
1.6 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const currentScopes = require('../currentScopes.js');
// Treeshakable guard to remove all code related to tracing
/**
* Determines if span recording is currently enabled.
*
* Spans are recorded when at least one of `tracesSampleRate` and `tracesSampler`
* is defined in the SDK config. This function does not make any assumption about
* sampling decisions, it only checks if the SDK is configured to record spans.
*
* Important: This function only determines if span recording is enabled. Trace
* continuation and propagation is separately controlled and not covered by this function.
* If this function returns `false`, traces can still be propagated (which is what
* we refer to by "Tracing without Performance")
* @see https://develop.sentry.dev/sdk/telemetry/traces/tracing-without-performance/
*
* @param maybeOptions An SDK options object to be passed to this function.
* If this option is not provided, the function will use the current client's options.
*/
function hasSpansEnabled(
maybeOptions,
) {
if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {
return false;
}
const options = maybeOptions || currentScopes.getClient()?.getOptions();
return (
!!options &&
// Note: This check is `!= null`, meaning "nullish". `0` is not "nullish", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)
(options.tracesSampleRate != null || !!options.tracesSampler)
);
}
exports.hasSpansEnabled = hasSpansEnabled;
//# sourceMappingURL=hasSpansEnabled.js.map