Rocky_Mountain_Vending/.pnpm-store/v10/files/5e/c5b4d8f1437399c7d13ee870d099774124982eeb424faad5f9604c00df76d58a0cd86cc62a82a36035944e9482457ea9395ac5d41840eb1c650b60669adcdb
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

45 lines
1.8 KiB
Text

import { getClient } from '../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 || 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)
);
}
/**
* @see JSDoc of `hasSpansEnabled`
* @deprecated Use `hasSpansEnabled` instead, which is a more accurately named version of this function.
* This function will be removed in the next major version of the SDK.
*/
// TODO(v10): Remove this export
const hasTracingEnabled = hasSpansEnabled;
export { hasSpansEnabled, hasTracingEnabled };
//# sourceMappingURL=hasSpansEnabled.js.map