Files
klz-cables.com/.pnpm-store/v10/files/b7/a8043bdfa0adbea3113da0c4f6c2e1ff073a403de92a33c451871712bf6bdb9ea3aaefa875fa26a94ffe7bc4f66ca165c148e702c27aa5690f127c991ce3c5
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

42 lines
1.5 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrumentation = require('@opentelemetry/instrumentation');
const core = require('@sentry/core');
const createMissingInstrumentationContext = require('./createMissingInstrumentationContext.js');
const detection = require('./detection.js');
/**
* Checks and warns if a framework isn't wrapped by opentelemetry.
*/
function ensureIsWrapped(
maybeWrappedFunction,
name,
) {
const clientOptions = core.getClient()?.getOptions();
if (
!clientOptions?.disableInstrumentationWarnings &&
!instrumentation.isWrapped(maybeWrappedFunction) &&
core.isEnabled() &&
core.hasSpansEnabled(clientOptions)
) {
core.consoleSandbox(() => {
if (detection.isCjs()) {
// eslint-disable-next-line no-console
console.warn(
`[Sentry] ${name} is not instrumented. This is likely because you required/imported ${name} before calling \`Sentry.init()\`.`,
);
} else {
// eslint-disable-next-line no-console
console.warn(
`[Sentry] ${name} is not instrumented. Please make sure to initialize Sentry in a separate file that you \`--import\` when running node, see: https://docs.sentry.io/platforms/javascript/guides/${name}/install/esm/.`,
);
}
});
core.getGlobalScope().setContext('missing_instrumentation', createMissingInstrumentationContext.createMissingInstrumentationContext(name));
}
}
exports.ensureIsWrapped = ensureIsWrapped;
//# sourceMappingURL=ensureIsWrapped.js.map