mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com> Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
26 lines
727 B
TypeScript
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");
|
|
}
|
|
}
|