From 2af7d4eeee957e197c26723adb6673a626fdd1af Mon Sep 17 00:00:00 2001 From: Anton Ovchinnikov Date: Thu, 29 Oct 2026 17:18:14 +0100 Subject: [PATCH] fix: send gateway OTLP directly to pulse.braintrust.dev When aiGateway.braintrustAppUrl is the default https://www.braintrust.dev, point OTLP_HTTP_ENDPOINT at https://pulse.braintrust.dev/otel instead of going through www. Custom app URLs keep {appUrl}/api/pulse/otel. --- braintrust/templates/ai-gateway-configmap.yaml | 4 ++++ braintrust/tests/ai-gateway-configmap_test.yaml | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/braintrust/templates/ai-gateway-configmap.yaml b/braintrust/templates/ai-gateway-configmap.yaml index 2bbc19e..dd524cf 100644 --- a/braintrust/templates/ai-gateway-configmap.yaml +++ b/braintrust/templates/ai-gateway-configmap.yaml @@ -33,6 +33,10 @@ data: {{- end }} {{- if .Values.global.controlPlaneTelemetry }} {{- $appUrl := .Values.aiGateway.braintrustAppUrl | trimSuffix "/" }} + {{- if eq $appUrl "https://www.braintrust.dev" }} + OTLP_HTTP_ENDPOINT: "https://pulse.braintrust.dev/otel" + {{- else }} OTLP_HTTP_ENDPOINT: {{ printf "%s/api/pulse/otel" $appUrl | quote }} {{- end }} + {{- end }} {{- end }} diff --git a/braintrust/tests/ai-gateway-configmap_test.yaml b/braintrust/tests/ai-gateway-configmap_test.yaml index 3f558bc..bd0bba5 100644 --- a/braintrust/tests/ai-gateway-configmap_test.yaml +++ b/braintrust/tests/ai-gateway-configmap_test.yaml @@ -49,7 +49,7 @@ tests: path: data.BRAINTRUST_URL_SECURITY_ALLOW_CIDRS - equal: path: data.OTLP_HTTP_ENDPOINT - value: "https://www.braintrust.dev/api/pulse/otel" + value: "https://pulse.braintrust.dev/otel" - it: should include URL security env vars when configured values: @@ -125,6 +125,19 @@ tests: - isNull: path: data.OTLP_HTTP_ENDPOINT + - it: should send OTLP directly to Pulse for the default app URL with trailing slash + values: + - __fixtures__/base-values.yaml + set: + aiGateway.enabled: true + aiGateway.braintrustAppUrl: "https://www.braintrust.dev/" + release: + namespace: "braintrust" + asserts: + - equal: + path: data.OTLP_HTTP_ENDPOINT + value: "https://pulse.braintrust.dev/otel" + - it: should derive OTLP_HTTP_ENDPOINT from braintrustAppUrl values: - __fixtures__/base-values.yaml