danswer/web/instrumentation.ts

13 lines
330 B
TypeScript
Raw Permalink Normal View History

export async function register() {
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
if (process.env.NEXT_RUNTIME === "nodejs") {
await import("./sentry.client.config");
await import("./sentry.server.config");
}
if (process.env.NEXT_RUNTIME === "edge") {
await import("./sentry.edge.config");
}
}
}