Skip to content

Commit 5610ee0

Browse files
committed
fix(telemetry): post browser events to TELEMETRY_ENDPOINT as-is and document routing per side
1 parent 0e3550c commit 5610ee0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/docs/content/docs/platform/self-hosting/environment-variables.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ helm template sim oci://ghcr.io/simstudioai/charts/sim --version 1.11.8 -f value
298298
| `OTEL_TRACES_SAMPLER_ARG` | Trace sampling ratio |
299299
| `OTEL_DEPLOYMENT_ENVIRONMENT` | Environment label on emitted spans |
300300
| `TELEMETRY_SAMPLING_RATIO` | Application-level sampling ratio |
301-
| `TELEMETRY_ENDPOINT` | Where anonymous telemetry is sent when `OTEL_EXPORTER_OTLP_ENDPOINT` is unset. Defaults to `https://telemetry.simstudio.ai/v1/traces`, which receives traces only; logs and metrics are exported only to a collector you configure. `NEXT_TELEMETRY_DISABLED=1` (the Docker and Helm default) turns all of it off |
301+
| `TELEMETRY_ENDPOINT` | Full URL browser telemetry events are posted to, as-is (they never carry `OTEL_EXPORTER_OTLP_HEADERS`). Server traces use it only when `OTEL_EXPORTER_OTLP_ENDPOINT` is unset. Defaults to `https://telemetry.simstudio.ai/v1/traces`, which receives traces only: server logs and metrics are exported only to a collector you configure. `NEXT_TELEMETRY_DISABLED=1` (the Docker and Helm default) turns all of it off |
302302
| `NEXT_TELEMETRY_DISABLED` | Set to `1` to disable anonymous telemetry entirely |
303303
| `GRAFANA_OTLP_ENDPOINT` / `GRAFANA_OTLP_HEADERS` / `GRAFANA_DEPLOYMENT_ENVIRONMENT` | Grafana Cloud OTLP export |
304304

‎apps/sim/app/api/telemetry/route.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ async function forwardToCollector(data: Record<string, unknown>): Promise<boolea
6565
}
6666
if (isTelemetryDisabled()) return false
6767

68-
const endpoint = normalizeOtlpTracesUrl(
69-
process.env.TELEMETRY_ENDPOINT || telemetryConfig.endpoint
70-
)
68+
// TELEMETRY_ENDPOINT has always been the relay's full destination URL, so it is posted to as-is.
69+
const endpoint =
70+
process.env.TELEMETRY_ENDPOINT || normalizeOtlpTracesUrl(telemetryConfig.endpoint)
7171
const timeout = DEFAULT_TIMEOUT
7272

7373
try {

0 commit comments

Comments
 (0)