Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

infra: add newrelic for test environments (#2558)

Max Deichmanncee615fcdcb1
diff --git a/web/src/instrumentation.ts b/web/src/instrumentation.ts
index f8a929ba42..0e0777f596 100644
--- a/web/src/instrumentation.ts
+++ b/web/src/instrumentation.ts
@@ -1,6 +1,10 @@
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
await import("./sentry.server.config");
+ // do not run new relic instrumentation in vercel production environments
+ if (process.env.NEW_RELIC_API_KEY && process.env.OTLP_ENDPOINT) {
+ await import("./new-relic-instrumentation");
+ }
}
if (process.env.NEXT_RUNTIME === "edge") {