2021-03-31 07:06:16 -07:00
|
|
|
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
|
2021-04-07 18:05:46 +05:30
|
|
|
|
2021-03-31 07:06:16 -07:00
|
|
|
basket-api:
|
|
|
|
environment:
|
|
|
|
- OTEL_USE_EXPORTER=otlp
|
|
|
|
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-http://otel-collector:4317}
|
|
|
|
- OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS}
|
2021-04-07 18:05:46 +05:30
|
|
|
|
|
|
|
catalog-api:
|
|
|
|
environment:
|
|
|
|
- OTEL_USE_EXPORTER=otlp
|
|
|
|
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-http://otel-collector:4317}
|
|
|
|
- OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS}
|
2021-03-31 07:06:16 -07:00
|
|
|
|
|
|
|
webmvc:
|
|
|
|
environment:
|
|
|
|
- OTEL_USE_EXPORTER=otlp
|
|
|
|
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:-http://otel-collector:4317}
|
|
|
|
- OTEL_EXPORTER_OTLP_HEADERS=${OTEL_EXPORTER_OTLP_HEADERS}
|