forked from Divineifed1/StrellerMinds-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.tracing.yml
More file actions
134 lines (126 loc) · 3.99 KB
/
docker-compose.tracing.yml
File metadata and controls
134 lines (126 loc) · 3.99 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: '3.8'
services:
# Jaeger - Distributed tracing backend
jaeger:
image: jaegertracing/all-in-one:1.50
container_name: strellerminds-jaeger
ports:
- "16686:16686" # Jaeger UI
- "14268:14268" # HTTP collector
- "14250:14250" # gRPC collector
- "6831:6831/udp" # UDP agent
- "6832:6832/udp" # UDP agent
- "5778:5778" # Config server
environment:
- COLLECTOR_OTLP_ENABLED=true
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
networks:
- tracing-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:14269/"]
interval: 30s
timeout: 10s
retries: 3
# Zipkin - Alternative distributed tracing backend
zipkin:
image: openzipkin/zipkin:2.24
container_name: strellerminds-zipkin
ports:
- "9411:9411" # Zipkin UI
environment:
- STORAGE_TYPE=mem
networks:
- tracing-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9411/"]
interval: 30s
timeout: 10s
retries: 3
# OpenTelemetry Collector - Unified observability data pipeline
otel-collector:
image: otel/opentelemetry-collector-contrib:0.88.0
container_name: strellerminds-otel-collector
command: ["--config=/etc/otel-collector-config.yml"]
volumes:
- ./src/tracing/otel-collector-config.yml:/etc/otel-collector-config.yml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "8888:8888" # Prometheus metrics
- "8889:8889" # Prometheus exporter metrics
depends_on:
- jaeger
- zipkin
networks:
- tracing-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:13133/"]
interval: 30s
timeout: 10s
retries: 3
# Grafana - Visualization and dashboards
grafana:
image: grafana/grafana:10.2.0
container_name: strellerminds-grafana
ports:
- "3001:3000" # Grafana UI
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana-storage:/var/lib/grafana
- ./src/tracing/grafana-dashboards:/etc/grafana/provisioning/dashboards
- ./src/tracing/grafana-datasources:/etc/grafana/provisioning/datasources
networks:
- tracing-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
# Prometheus - Metrics collection and storage
prometheus:
image: prom/prometheus:v2.47.0
container_name: strellerminds-prometheus
ports:
- "9090:9090" # Prometheus UI
volumes:
- ./src/tracing/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-storage:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--storage.tsdb.retention.time=200h'
- '--web.enable-lifecycle'
networks:
- tracing-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9090/-/healthy"]
interval: 30s
timeout: 10s
retries: 3
# Redis - For caching and queue management
redis-tracing:
image: redis:7-alpine
container_name: strellerminds-redis-tracing
ports:
- "6380:6379" # Different port to avoid conflicts
command: redis-server --appendonly yes --requirepass redis_tracing_password
volumes:
- redis-tracing-storage:/data
networks:
- tracing-network
healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
interval: 30s
timeout: 10s
retries: 3
networks:
tracing-network:
driver: bridge
volumes:
grafana-storage:
prometheus-storage:
redis-tracing-storage: