Skip to content

Commit d840f69

Browse files
authored
feat: Revisit OTEL & setup Grafana + Prometheus + metrics dashboard (#192)
* build: Set up otel-collector with prometheus and grafana * fix: Marshal event with telemetry data * fix: Event lifecycle metrics * chore: Include destination type attribute in metrics * chore: Grafana otel-collector accept traces & logs * build: Grafana provisioning * chore: Rename otel-collector-config.yaml file * chore: Rename data source file to avoid prom linter * build: Delivery success rate panel
1 parent a9cff26 commit d840f69

File tree

17 files changed

+796
-51
lines changed

17 files changed

+796
-51
lines changed

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ up/mqs:
2020
down/mqs:
2121
docker-compose -f build/dev/mqs/compose.yml down
2222

23+
up/grafana:
24+
docker-compose -f build/dev/grafana/compose.yml up -d
25+
26+
down/grafana:
27+
docker-compose -f build/dev/grafana/compose.yml down
28+
2329
up/uptrace:
2430
docker-compose -f build/dev/uptrace/compose.yml up -d
2531

build/dev/compose.yml

-13
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,6 @@ services:
110110
timeout: 1s
111111
retries: 30
112112

113-
otel-collector:
114-
image: otel/opentelemetry-collector-contrib
115-
volumes:
116-
- ./otel-collector.yaml:/etc/otelcol-contrib/config.yaml
117-
ports:
118-
- 1888:1888 # pprof extension
119-
- 8888:8888 # Prometheus metrics exposed by the Collector
120-
- 8889:8889 # Prometheus exporter metrics
121-
- 13133:13133 # health_check extension
122-
- 4317:4317 # OTLP gRPC receiver
123-
- 4318:4318 # OTLP http receiver
124-
- 55679:55679 # zpages extension
125-
126113
volumes:
127114
redis:
128115
driver: local

build/dev/grafana/compose.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "outpost-grafana"
2+
3+
services:
4+
otel-collector:
5+
image: otel/opentelemetry-collector-contrib:latest
6+
command: ["--config=/etc/otel-collector-config.yaml"]
7+
volumes:
8+
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
9+
ports:
10+
- "4317:4317" # OTLP gRPC
11+
- "4318:4318" # OTLP HTTP
12+
- "8888:8888" # Telemetry metrics
13+
- "8889:8889" # Prometheus metrics
14+
15+
prometheus:
16+
image: prom/prometheus:latest
17+
volumes:
18+
- ./prometheus.yml:/etc/prometheus/prometheus.yml
19+
ports:
20+
- "9090:9090"
21+
22+
grafana:
23+
image: grafana/grafana:latest
24+
ports:
25+
- "3000:3000"
26+
environment:
27+
- GF_SECURITY_ADMIN_USER=admin
28+
- GF_SECURITY_ADMIN_PASSWORD=admin
29+
- GF_AUTH_ANONYMOUS_ENABLED=true
30+
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
31+
- GF_AUTH_DISABLE_LOGIN_FORM=true
32+
volumes:
33+
- ./provisioning/datasources:/etc/grafana/provisioning/datasources
34+
- ./provisioning/dashboards:/etc/grafana/provisioning/dashboards
35+
- ./dashboards:/etc/grafana/dashboards
36+
37+
volumes:
38+
grafana-data:
39+
40+
networks:
41+
default:
42+
name: outpost
43+
external: true

0 commit comments

Comments
 (0)