Path: blob/main/extensions/copilot/docs/monitoring/docker-compose.yaml
13389 views
# Copilot Chat OTel monitoring stack1#2# Starts an OpenTelemetry Collector that accepts OTLP on :4318 (HTTP) and :4317 (gRPC),3# then forwards traces/metrics/logs to Azure Application Insights and a local Jaeger instance.4#5# Usage:6# # Set your App Insights connection string:7# export APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=...;IngestionEndpoint=..."8#9# # Start the stack:10# docker compose up -d11#12# # View traces in Jaeger:13# open http://localhost:1668714#15# # Then launch VS Code with:16# COPILOT_OTEL_ENABLED=true OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4328 code .1718services:19otel-collector:20image: otel/opentelemetry-collector-contrib:latest21command: ["--config=/etc/otel-collector-config.yaml"]22volumes:23- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro24ports:25- "4327:4317" # OTLP gRPC (host:4327 → container:4317)26- "4328:4318" # OTLP HTTP (host:4328 → container:4318)27environment:28- APPLICATIONINSIGHTS_CONNECTION_STRING=${APPLICATIONINSIGHTS_CONNECTION_STRING:-}29restart: unless-stopped3031jaeger:32image: jaegertracing/jaeger:latest33ports:34- "16687:16686" # Jaeger UI (host:16687 to avoid conflict)35restart: unless-stopped363738