import { env } from "./env.js";

//#region src/sentry.ts
let sentryModule = null;
if (env.SENTRY_DSN) try {
	const Sentry = await import("@sentry/node");
	Sentry.init({
		dsn: env.SENTRY_DSN,
		environment: env.ENVIRONMENT || "development",
		skipOpenTelemetrySetup: true,
		tracesSampleRate: 0,
		sendDefaultPii: true
	});
	sentryModule = Sentry;
} catch {}
const sentry = new Proxy({}, { get(_, prop) {
	if (!sentryModule) return typeof prop === "string" ? () => void 0 : void 0;
	return sentryModule[prop];
} });

//#endregion
export { sentry };