-
Notifications
You must be signed in to change notification settings - Fork 35
/
docker-compose.telemetry.yml
96 lines (92 loc) · 2.69 KB
/
docker-compose.telemetry.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
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
#
# Inspired by
# https://github.com/open-telemetry/opentelemetry-demo/blob/main/docker-compose.yml
#
version: '3.7'
x-default-logging: &logging
driver: "json-file"
options:
max-size: "5m"
max-file: "2"
services:
# Jaeger
jaeger:
image: jaegertracing/all-in-one:1.47
container_name: jaeger
command:
- "--memory.max-traces"
- "10000"
- "--query.base-path"
- "/jaeger/ui"
- "--prometheus.server-url"
- "http://prometheus:9090"
deploy:
resources:
limits:
memory: 300M
restart: unless-stopped
ports:
- "16686:16686" # Jaeger UI
- "4317" # OTLP gRPC default port
environment:
- COLLECTOR_OTLP_ENABLED=true
- METRICS_STORAGE_TYPE=prometheus
logging: *logging
# Grafana
grafana:
image: grafana/grafana:9.4.7
container_name: grafana
deploy:
resources:
limits:
memory: 100M
volumes:
- ./config/telemetry/grafana.ini:/etc/grafana/grafana.ini
- ./config/telemetry/provisioning/:/etc/grafana/provisioning/
ports:
- "3333:3000"
logging: *logging
# OpenTelemetry Collector
otelcol:
image: otel/opentelemetry-collector-contrib:0.81.0
container_name: otel-col
deploy:
resources:
limits:
memory: 125M
restart: unless-stopped
command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-observability.yml", "--config=/etc/otelcol-config-extras.yml" ]
volumes:
- ./config/telemetry/otelcol-config.yml:/etc/otelcol-config.yml
- ./config/telemetry/otelcol-observability.yml:/etc/otelcol-observability.yml
- ./config/telemetry/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml
ports:
- "4317:4317" # OTLP over gRPC receiver
- "4318:4318" # OTLP over HTTP receiver
- "9464" # Prometheus exporter
- "8888" # metrics endpoint
depends_on:
- jaeger
logging: *logging
# Prometheus
prometheus:
image: quay.io/prometheus/prometheus:v2.43.0
container_name: prometheus
command:
- --web.console.templates=/etc/prometheus/consoles
- --web.console.libraries=/etc/prometheus/console_libraries
- --storage.tsdb.retention.time=1h
- --config.file=/etc/prometheus/prometheus-config.yaml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
- --web.route-prefix=/
- --enable-feature=exemplar-storage
volumes:
- ./config/telemetry/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml
deploy:
resources:
limits:
memory: 300M
ports:
- "9090:9090"
logging: *logging