UNPKG

@sentry/core

Version:
14 lines (11 loc) 579 B
import { getClient } from '../currentScopes.js'; 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); } export { hasSpansEnabled }; //# sourceMappingURL=hasSpansEnabled.js.map