-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
135 lines (126 loc) · 3.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
135 lines (126 loc) · 3.36 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
135
services:
otel-collector:
image: otel/opentelemetry-collector-contrib:0.87.0
container_name: otel-collector
command: ["--config=/etc/otelcol/config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otelcol/config.yaml:ro
ports:
# OTLP
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
# Observability / health
- "8888:8888" # Internal Collector metrics (Prometheus scrape)
- "8889:8889" # External Collector metrics (Prometheus scrape)
- "13133:13133" # Health check
- "55679:55679" # zPages
depends_on:
- jaeger
- loki
networks:
- otel
restart: unless-stopped
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger
environment:
- COLLECTOR_ZIPKIN_HTTP_PORT=9411
ports:
- "16686:16686" # Jaeger UI
- "14250:14250"
- "14268:14268"
- "9411:9411" # Zipkin compatible
networks:
- otel
restart: unless-stopped
prometheus:
image: prom/prometheus:latest
container_name: prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.retention.time=2d"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
ports:
- "9090:9090"
depends_on:
- otel-collector
networks:
- otel
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
ports:
- "3000:3000"
depends_on:
- prometheus
- loki
networks:
- otel
restart: unless-stopped
# --- Sample traffic generators (optional but useful) ---
telemetrygen-traces:
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
container_name: telemetrygen-traces
command:
- "traces"
- "--otlp-endpoint=otel-collector:4317"
- "--otlp-insecure=true"
- "--rate=5" # spans/sec
- "--duration=inf" # 0 = run forever
- "--service=sample-tracegen"
depends_on:
- otel-collector
networks:
- otel
restart: unless-stopped
scale: 0
telemetrygen-metrics:
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
container_name: telemetrygen-metrics
command:
- "metrics"
- "--otlp-endpoint=otel-collector:4317"
- "--otlp-insecure=true"
- "--interval=5s"
- "--duration=inf"
- "--service=sample-metricgen"
depends_on:
- otel-collector
networks:
- otel
restart: unless-stopped
scale: 0
telemetrygen-logs:
image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest
container_name: telemetrygen-logs
command:
- "logs"
- "--otlp-endpoint=otel-collector:4317"
- "--otlp-insecure=true"
- "--rate=2" # logs/sec
- "--duration=inf"
- "--service=sample-logsgen"
depends_on:
- otel-collector
networks:
- otel
restart: unless-stopped
scale: 0
loki:
image: grafana/loki:latest
container_name: loki
volumes:
- ./loki-config.yaml:/etc/loki/config.yaml
command: -config.file=/etc/loki/config.yaml
ports:
- "3100:3100"
networks:
- otel
restart: unless-stopped
networks:
otel:
driver: bridge