()
| 3 | import { LangfuseExporter } from 'langfuse-vercel'; |
| 4 | |
| 5 | export async function register() { |
| 6 | if ( |
| 7 | process.env.LANGFUSE_SECRET_KEY && |
| 8 | process.env.NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY |
| 9 | ) { |
| 10 | console.log("Registering Langfuse"); |
| 11 | registerOTel({ |
| 12 | serviceName: 'sourcebot', |
| 13 | traceExporter: new LangfuseExporter({ |
| 14 | secretKey: process.env.LANGFUSE_SECRET_KEY, |
| 15 | publicKey: process.env.NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY, |
| 16 | baseUrl: process.env.NEXT_PUBLIC_LANGFUSE_BASE_URL, |
| 17 | }), |
| 18 | }); |
| 19 | } |
| 20 | |
| 21 | if (process.env.NEXT_RUNTIME === 'nodejs') { |
| 22 | await import('../sentry.server.config'); |
| 23 | } |
| 24 | |
| 25 | if (process.env.NEXT_RUNTIME === 'edge') { |
| 26 | await import('../sentry.edge.config'); |
| 27 | } |
| 28 | |
| 29 | if (process.env.NEXT_RUNTIME === 'nodejs') { |
| 30 | await import('./initialize'); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | export const onRequestError = Sentry.captureRequestError; |
nothing calls this directly
no outgoing calls
no test coverage detected