mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-22 02:55:04 -05:00
2964f2e079
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
15 lines
471 B
TypeScript
15 lines
471 B
TypeScript
import { PROMETHEUS_ENABLED, SENTRY_DSN } from "@formbricks/lib/constants";
|
|
|
|
// instrumentation.ts
|
|
export const register = async () => {
|
|
if (process.env.NEXT_RUNTIME === "nodejs" && PROMETHEUS_ENABLED) {
|
|
await import("./instrumentation-node");
|
|
}
|
|
if (process.env.NEXT_RUNTIME === "nodejs" && SENTRY_DSN) {
|
|
await import("./sentry.server.config");
|
|
}
|
|
if (process.env.NEXT_RUNTIME === "edge" && SENTRY_DSN) {
|
|
await import("./sentry.edge.config");
|
|
}
|
|
};
|