garage/script/telemetry/README.md

41 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2026-09-28 22:52:11 +02:00
# Garage telemetry test stack
2022-04-06 14:10:18 +02:00
2026-09-28 22:52:11 +02:00
A small local stack to look at Garage metrics and traces:
- [Prometheus](https://prometheus.io) scrapes Garage metrics from the admin API
- [Jaeger](https://www.jaegertracing.io) receives traces over OTLP
- [Grafana](https://grafana.com) with the Garage dashboard preloaded
## Configure Garage
Build Garage with the `telemetry-otlp` feature to export traces, then set in your config:
```toml
2022-04-06 14:10:18 +02:00
[admin]
api_bind_addr = "0.0.0.0:3903"
trace_sink = "http://localhost:4317"
```
2026-09-28 22:52:11 +02:00
The admin API must listen on an address reachable from containers, not the local loopback.
If you set `metrics_token`, uncomment the `authorization` section in `prometheus.yml`.
## Start the stack
2022-04-06 14:10:18 +02:00
```
2026-09-28 22:52:11 +02:00
cd script/telemetry
docker compose up
2022-04-06 14:10:18 +02:00
```
2026-09-28 22:52:11 +02:00
## Web interfaces
- [Grafana](http://localhost:3000): The *Garage* dashboard is preloaded, and traces can be browsed in Explore with the *Jaeger* data source.
- [Jaeger](http://localhost:16686): trace search UI
- [Prometheus](http://localhost:9090): check that the `garage` target is up under Status → Targets
2022-04-06 14:10:18 +02:00
2026-09-28 22:52:11 +02:00
Traces are kept in memory and are lost when Jaeger restarts.
Metrics are kept for 7 days.
Run `docker compose down -v` to remove all data.
2022-04-06 14:10:18 +02:00
2026-09-28 22:52:11 +02:00
## Upgrades
2022-04-06 14:10:18 +02:00
2026-09-28 22:52:11 +02:00
The versions are managed in the `.env` file.