-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (91 loc) 路 2.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (91 loc) 路 2.96 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
---
# References:
# https://github.com/docker/awesome-compose/blob/master/prometheus-grafana/compose.yaml.
# https://github.com/ruanbekker/grafana-tempo-loki-tracing/blob/main/docker-compose.yaml.
# https://github.com/grafana/tempo/blob/main/example/docker-compose/otel-collector-multitenant/docker-compose.yaml.
# https://github.com/blueswen/fastapi-observability/blob/main/docker-compose.yaml.
x-logging: &default-logging
driver: loki
options:
loki-url: 'http://localhost:3100/loki/api/v1/push'
loki-pipeline-stages: |
- multiline:
firstline: '^\d{4}-\d{2}-\d{2} \d{1,2}:\d{2}:\d{2}'
max_wait_time: 3s
- regex:
expression: '^(?P<time>\d{4}-\d{2}-\d{2} \d{1,2}:\d{2}:\d{2},\d{3}) (?P<message>(?s:.*))$$'
services:
loki:
image: grafana/loki
container_name: loki
command: -config.file=/etc/loki/local-config.yaml
ports:
- 3100:3100
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- --config.file=/etc/prometheus.yml
- --web.enable-remote-write-receiver
- --enable-feature=exemplar-storage
- --enable-feature=native-histograms
ports:
- 9090:9090
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus.yml
logging: *default-logging
depends_on:
- loki
# TODO: figure out why this version works, but latest doesn't.
tempo:
image: grafana/tempo:2.4.1
container_name: tempo
command: [ "-config.file=/etc/config.yml" ]
ports:
- 3200:3200 # tempo http.
- 4317:4317 # otlp (grpc).
- 4318:4318 # otlp (http).
volumes:
- ./tempo/config.yml:/etc/config.yml
logging: *default-logging
depends_on:
- loki
- prometheus
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor metricsSummary
- GF_USERS_DEFAULT_THEME=dark
volumes:
- ./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasources.yml
logging: *default-logging
depends_on:
- loki
- prometheus
- tempo
# TODO: figure out why every version after this one fails to expose the ':8888/metrics' endpoint.
open-telemetry-collector:
image: otel/opentelemetry-collector-contrib:0.110.0
container_name: open-telemetry-collector
command:
- --config=file:/etc/config.yml
ports:
- 4319:4319 # otlp (grpc).
- 4320:4320 # otlp (http).
- 1888:1888 # pprof extension.
- 13133:13133 # health_check extension.
- 55679:55679 # zpages extension.
- 8888:8888 # Prometheus metrics exposed by collector.
- 8889:8889 # Prometheus exporter metrics.
volumes:
- ./open-telemetry-collector/config.yml:/etc/config.yml
logging: *default-logging
depends_on:
- loki
- tempo