From 3277b7b4194f209c7bf0840d4edf05e0a1b04c1f Mon Sep 17 00:00:00 2001 From: Anik Bhattacharjee Date: Fri, 24 Jul 2026 12:58:50 -0400 Subject: [PATCH] LCORE-1802: Add OpenTelemetry environment variables to docker-compose Add OpenTelemetry OTLP exporter configuration environment variables to docker-compose files with safe defaults that keep tracing disabled until explicitly enabled. Variables added use `${VAR_NAME:-default}` pattern for flexible configuration: 1. **`OTEL_EXPORTER_OTLP_ENDPOINT`** - OTLP collector endpoint URL (default: empty) 2. **`OTEL_EXPORTER_OTLP_PROTOCOL`** - Export protocol, e.g. `http/protobuf` or `grpc` (default: empty) 3. **`OTEL_SERVICE_NAME`** - Service identifier in traces (default: empty) 4. **`OTEL_SDK_DISABLED`** - Enable/disable tracing (default: `true` - **tracing OFF**) Signed-off-by: Anik Bhattacharjee --- docker-compose-library.yaml | 5 +++++ docker-compose.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docker-compose-library.yaml b/docker-compose-library.yaml index 2e3d948ce..d9293a85b 100755 --- a/docker-compose-library.yaml +++ b/docker-compose-library.yaml @@ -61,6 +61,11 @@ services: - FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-} # Prevent HuggingFace Hub update checks (HTTP 429 rate-limiting in CI from parallel jobs). - HF_HUB_OFFLINE=1 + # OpenTelemetry configuration (tracing disabled by default) + - OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-} + - OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL:-} + - OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-} + - OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED:-true} healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/liveness"] interval: 10s # how often to run the check diff --git a/docker-compose.yaml b/docker-compose.yaml index aa4631ad6..01508941a 100755 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -101,6 +101,11 @@ services: # Substituted in mounted lightspeed-stack.yaml (llama_stack.url); GitHub Actions sets via vars - E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack} - E2E_LLAMA_PORT=${E2E_LLAMA_PORT:-8321} + # OpenTelemetry configuration (tracing disabled by default) + - OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-} + - OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL:-} + - OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-} + - OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED:-true} depends_on: llama-stack: condition: service_healthy