Route Dagger build telemetry to Tempo
The Dagger engine's internal OTLP proxy returns 500 on /v1/metrics when there's no real backend, causing ~9s retry warnings per pipeline step. Point OTEL_EXPORTER_OTLP_ENDPOINT at Tempo to give it a real endpoint. Also removes the stale os.environ workaround from main.py (the SDK initializes telemetry before our module loads, so it had no effect). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ab834b641a
commit
b5551e227e
3 changed files with 6 additions and 9 deletions
|
|
@ -73,6 +73,11 @@ jobs:
|
||||||
needs: detect
|
needs: detect
|
||||||
if: needs.detect.outputs.dagger != '[]'
|
if: needs.detect.outputs.dagger != '[]'
|
||||||
runs-on: k8s
|
runs-on: k8s
|
||||||
|
env:
|
||||||
|
# Send Dagger OTLP telemetry to Tempo. Without a real backend the
|
||||||
|
# engine's internal proxy returns 500 on /v1/metrics, causing noisy
|
||||||
|
# retry warnings in every build.
|
||||||
|
OTEL_EXPORTER_OTLP_ENDPOINT: http://tempo.tracing.svc.cluster.local:4318
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
container: ${{ fromJson(needs.detect.outputs.dagger) }}
|
container: ${{ fromJson(needs.detect.outputs.dagger) }}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Fix OTEL metrics exporter warnings in Dagger builds by hard-overriding the env var before SDK init.
|
Route Dagger build telemetry to Tempo, fixing OTEL metrics exporter warnings.
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,5 @@
|
||||||
import os
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Force-disable OTLP metrics exporter before the Dagger SDK initializes
|
|
||||||
# OpenTelemetry. The engine shim may set OTEL_METRICS_EXPORTER=otlp before
|
|
||||||
# our module loads, so setdefault won't work — we need a hard override.
|
|
||||||
# Without this, the engine's local OTLP endpoint returns 500s on metrics,
|
|
||||||
# causing ~9s retry cycles per pipeline step.
|
|
||||||
os.environ["OTEL_METRICS_EXPORTER"] = "none"
|
|
||||||
|
|
||||||
import dagger
|
import dagger
|
||||||
from dagger import dag, function, object_type
|
from dagger import dag, function, object_type
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue