-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose.yaml
87 lines (80 loc) · 2.64 KB
/
docker-compose.yaml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: "3.4"
services:
fastapi:
# build: ./app_fastapi/
image: ghcr.io/blueswen/opentelemetry-apm/fastapi:latest
ports:
- "8000:8000"
environment:
- TARGET_ONE_SVC=spring-boot:8080
- TARGET_TWO_SVC=spring-boot:8080
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_METRICS_EXPORTER=none
- OTEL_SERVICE_NAME=fastapi
command: "opentelemetry-instrument python main.py"
spring-boot:
# build: ./app_springboot/
image: ghcr.io/blueswen/opentelemetry-apm/springboot:latest
ports:
- "8080:8080"
environment:
- TARGET_ONE_SVC=fastapi:8000
- TARGET_TWO_SVC=fastapi:8000
- OTEL_EXPORTER=otlp_span
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_EXPORTER_OTLP_INSECURE=true
- OTEL_METRICS_EXPORTER=none
- OTEL_SERVICE_NAME=spring-boot
command: "java -javaagent:/opentelemetry-javaagent.jar -jar /app.jar"
express:
# build: ./app_express/
image: ghcr.io/blueswen/opentelemetry-apm/express:latest
ports:
- "3001:3001"
environment:
- EXPOSE_PORT=3001
- TARGET_ONE_SVC=fastapi:8000
- TARGET_TWO_SVC=fastapi:8000
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_SERVICE_NAME=express
command: "node --require '@opentelemetry/auto-instrumentations-node/register' app.js"
otel-collector:
image: otel/opentelemetry-collector-contrib:0.100.0
command:
- "--config=/conf/config.yaml"
volumes:
- ./etc/otel-collector-config.yaml:/conf/config.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP http receiver
- "8889:8889" # Prometheus metrics exporter
restart: on-failure
depends_on:
- tempo
tempo:
image: grafana/tempo:2.4.1
command: [ "--target=all", "--storage.trace.backend=local", "--storage.trace.local.path=/var/tempo", "--auth.enabled=false" ]
ports:
- "14250:14250"
prometheus:
image: prom/prometheus:v2.51.2
ports:
- "9090:9090"
volumes:
- ./etc/prometheus.yml:/workspace/prometheus.yml
command:
- --config.file=/workspace/prometheus.yml
grafana:
image: grafana/grafana:10.4.2
ports:
- "3000:3000"
volumes:
- ./etc/grafana/:/etc/grafana/provisioning/datasources
- ./etc/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml
- ./etc/dashboards:/etc/grafana/dashboards
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
GF_FEATURE_TOGGLES_ENABLE: "timeSeriesTable"