version: '3.4' # The OpenTelemetry docker-compose file is used to configure OpenTelemetry for the services # # You need to start it with the following CLI command: # docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.opentelemetry.otlp.yml up services: otel-collector: image: otel/opentelemetry-collector:latest command: ["--config=/etc/otel-collector-config.yaml"] volumes: - ./OpenTelemetry/otel-collector-config.yaml:/etc/otel-collector-config.yaml ports: - "4317" # OTLP gRPC receiver basket-api: environment: - OTEL_USE_EXPORTER=otlp - OTEL_EXPORTER_TOOL_ENDPOINT=${OTEL_EXPORTER_TOOL_ENDPOINT:-http://otel-collector:4317} - OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS} catalog-api: environment: - OTEL_USE_EXPORTER=otlp - OTEL_EXPORTER_TOOL_ENDPOINT=${OTEL_EXPORTER_TOOL_ENDPOINT:-http://otel-collector:4317} - OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS} webmvc: environment: - OTEL_USE_EXPORTER=otlp - OTEL_EXPORTER_TOOL_ENDPOINT=${OTEL_EXPORTER_TOOL_ENDPOINT:-http://otel-collector:4317} - OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS}