-
Notifications
You must be signed in to change notification settings - Fork 130
/
Copy pathdocker-compose.yml
29 lines (29 loc) · 1003 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3'
services:
app:
build: ./
environment:
OTEL_SERVICE_NAME: "agent-example-app"
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "http://collector:4318/v1/traces"
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: "http://collector:4318/v1/metrics"
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: "http://collector:4318/v1/logs"
# Logs are disabled by default
OTEL_LOGS_EXPORTER: "otlp"
# Optional specify file configuration instead of using environment variable scheme
# To use, call "export OTEL_EXPERIMENTAL_CONFIG_FILE=/sdk-config.yaml" before calling docker compose up
OTEL_EXPERIMENTAL_CONFIG_FILE:
ports:
- "8080:8080"
volumes:
- ./sdk-config.yaml:/sdk-config.yaml
depends_on:
- collector
collector:
image: otel/opentelemetry-collector-contrib:0.117.0
volumes:
- ./collector-config.yaml:/collector-config.yaml
command: ["--config=/collector-config.yaml"]
expose:
- "4318"
ports:
- "4318:4318"