🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix: copy newrelic config file into worker container (#2549)
Max Deichmann7e05729e935c
diff --git a/web/Dockerfile b/web/Dockerfileindex d6bcd71c44..bdcbb84b7b 100644--- a/web/Dockerfile+++ b/web/Dockerfile@@ -3,8 +3,6 @@ FROM --platform=${BUILDPLATFORM:-linux/amd64} node:20-alpine3.20 AS alpine# It's important to update the index before installing packages to ensure you're getting the latest versions.# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 libc6-compat busybox ssl_client-# required for newrelic event loop metrics-RUN apk add --no-cache build-baseFROM --platform=${BUILDPLATFORM:-linux/amd64} alpine AS baseRUN npm install turbo@^1.13.3 --globaldiff --git a/web/src/new-relic-instrumentation.ts b/web/src/new-relic-instrumentation.tsindex ab539d6534..ba26431e52 100644--- a/web/src/new-relic-instrumentation.ts+++ b/web/src/new-relic-instrumentation.ts@@ -3,7 +3,7 @@ import { getNodeAutoInstrumentations } from "@opentelemetry/auto-instrumentationimport { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";import { Resource } from "@opentelemetry/resources";import { SEMRESATTRS_SERVICE_NAME } from "@opentelemetry/semantic-conventions";-import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node";+import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-node";import { PrismaInstrumentation } from "@prisma/instrumentation";import {awsEksDetector,@@ -22,9 +22,11 @@ const sdk = new NodeSDK({[SEMRESATTRS_SERVICE_NAME]: "web",}),spanProcessors: [- new SimpleSpanProcessor(+ new BatchSpanProcessor(new OTLPTraceExporter({- url: process.env.OTLP_ENDPOINT || "https://otlp.eu01.nr-data.net",+ url:+ process.env.OTLP_ENDPOINT ||+ "https://otlp.eu01.nr-data.net/v1/traces",headers: {"api-key": process.env.NEW_RELIC_API_KEY,},diff --git a/worker/Dockerfile b/worker/Dockerfileindex d814f0c435..15db1b503c 100644--- a/worker/Dockerfile+++ b/worker/Dockerfile@@ -3,8 +3,7 @@ FROM --platform=${BUILDPLATFORM:-linux/amd64} node:20-alpine3.20 AS alpine# It's important to update the index before installing packages to ensure you're getting the latest versions.# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 libc6-compat busybox ssl_client-# required for newrelic event loop metrics-RUN apk add --no-cache build-base+FROM --platform=${BUILDPLATFORM:-linux/amd64} alpine AS baseRUN npm install turbo@^1.13.3 --global@@ -59,6 +58,7 @@ RUN addgroup --system --gid 1001 expressjsRUN adduser --system --uid 1001 expressjsUSER expressjsCOPY --from=builder --chown=expressjs:expressjs /app .+COPY --chown=expressjs:expressjs ./worker/newrelic.js ./newrelic.jsEXPOSE 3030ENV PORT=3030diff --git a/worker/newrelic.js b/worker/newrelic.jsindex e24b0eff94..e0d912c4e6 100644--- a/worker/newrelic.js+++ b/worker/newrelic.js@@ -18,4 +18,9 @@ exports.config = {logging: {enabled: false,},+ application_logging: {+ forwarding: {+ enabled: false,+ },+ },};