Skip to content

Commit 3277b7b

Browse files
committed
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 <anbhatta@redhat.com>
1 parent 688e89d commit 3277b7b

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

docker-compose-library.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ services:
6161
- FAISS_VECTOR_STORE_ID=${FAISS_VECTOR_STORE_ID:-}
6262
# Prevent HuggingFace Hub update checks (HTTP 429 rate-limiting in CI from parallel jobs).
6363
- HF_HUB_OFFLINE=1
64+
# OpenTelemetry configuration (tracing disabled by default)
65+
- OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-}
66+
- OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL:-}
67+
- OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-}
68+
- OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED:-true}
6469
healthcheck:
6570
test: ["CMD", "curl", "-f", "http://localhost:8080/liveness"]
6671
interval: 10s # how often to run the check

docker-compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ services:
101101
# Substituted in mounted lightspeed-stack.yaml (llama_stack.url); GitHub Actions sets via vars
102102
- E2E_LLAMA_HOSTNAME=${E2E_LLAMA_HOSTNAME:-llama-stack}
103103
- E2E_LLAMA_PORT=${E2E_LLAMA_PORT:-8321}
104+
# OpenTelemetry configuration (tracing disabled by default)
105+
- OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT:-}
106+
- OTEL_EXPORTER_OTLP_PROTOCOL=${OTEL_EXPORTER_OTLP_PROTOCOL:-}
107+
- OTEL_SERVICE_NAME=${OTEL_SERVICE_NAME:-}
108+
- OTEL_SDK_DISABLED=${OTEL_SDK_DISABLED:-true}
104109
depends_on:
105110
llama-stack:
106111
condition: service_healthy

0 commit comments

Comments
 (0)