Update Docker Compose configuration to enhance observability with health checks for Jaeger and OpenTelemetry Collector. Modify telemetry settings in the development configuration to enable metrics collection. Adjust endpoint settings for Jaeger in the OpenTelemetry Collector configuration.

This commit is contained in:
windyboy
2025-11-15 14:42:33 +08:00
parent cdb0cea8f7
commit 1378d6e31b
4 changed files with 15 additions and 3 deletions
+8
View File
@@ -82,6 +82,8 @@ services:
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
otel-collector:
# Receives OTLP HTTP(4318)/gRPC(4317) traffic from the host dev app.
# Forwarding of traces/metrics is defined in configs/otel-collector.dev.yaml.
image: otel/opentelemetry-collector-contrib:0.99.0
command:
- "--config=/etc/otelcol/config.yaml"
@@ -105,6 +107,12 @@ services:
environment:
COLLECTOR_OTLP_ENABLED: "true"
LOG_LEVEL: debug
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:16686 2>/dev/null | grep -q Jaeger"]
interval: 10s
timeout: 3s
retries: 6
start_period: 5s
networks:
- devnet