Rocky_Mountain_Vending/.pnpm-store/v10/files/cd/5b977e8202e5ccbfd053f154a4f22a7e42faf64a86fe385ce300e9acd1b32c6013cd22c8055ea8ed9fe87a6863620d6feb0dbbfdc76bc35ee2c6724de35563
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

39 lines
1.4 KiB
Text

import { isWrapped } from '@opentelemetry/instrumentation';
import { getClient, isEnabled, hasSpansEnabled, consoleSandbox, getGlobalScope } from '@sentry/core';
import { isCjs } from './commonjs.js';
import { createMissingInstrumentationContext } from './createMissingInstrumentationContext.js';
/**
* Checks and warns if a framework isn't wrapped by opentelemetry.
*/
function ensureIsWrapped(
maybeWrappedFunction,
name,
) {
const clientOptions = getClient()?.getOptions();
if (
!clientOptions?.disableInstrumentationWarnings &&
!isWrapped(maybeWrappedFunction) &&
isEnabled() &&
hasSpansEnabled(clientOptions)
) {
consoleSandbox(() => {
if (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/.`,
);
}
});
getGlobalScope().setContext('missing_instrumentation', createMissingInstrumentationContext(name));
}
}
export { ensureIsWrapped };
//# sourceMappingURL=ensureIsWrapped.js.map