Files
formbricks-formbricks/apps/web/instrumentation.ts
Matti Nannt 9872d17abe feat: AI-based Open-Text Summary & new Experience page (#3038)
Co-authored-by: Johannes <johannes@formbricks.com>
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
2024-10-20 12:06:46 +02:00

26 lines
727 B
TypeScript

import { registerOTel } from "@vercel/otel";
import { LangfuseExporter } from "langfuse-vercel";
import { env } from "@formbricks/lib/env";
export async function register() {
if (env.LANGFUSE_SECRET_KEY && env.LANGFUSE_PUBLIC_KEY && env.LANGFUSE_BASEURL) {
registerOTel({
serviceName: "formbricks-cloud-dev",
traceExporter: new LangfuseExporter({
debug: false,
secretKey: env.LANGFUSE_SECRET_KEY,
publicKey: env.LANGFUSE_PUBLIC_KEY,
baseUrl: env.LANGFUSE_BASEURL,
}),
});
}
if (process.env.NEXT_RUNTIME === "nodejs") {
await import("./sentry.server.config");
}
if (process.env.NEXT_RUNTIME === "edge") {
await import("./sentry.edge.config");
}
}