3 If you run akkoma, you may be inclined to collect metrics to ensure your instance is running smoothly,
4 and that there's nothing quietly failing in the background.
6 To facilitate this, akkoma exposes prometheus metrics to be scraped.
10 See: [export\_prometheus\_metrics](../../configuration/cheatsheet#instance)
12 To scrape prometheus metrics, we need an oauth2 token with the `admin:metrics` scope.
14 consider using [constanze](https://akkoma.dev/AkkomaGang/constanze) to make this easier -
17 constanze token --client-app --scopes "admin:metrics" --client-name "Prometheus"
20 or see `scripts/create_metrics_app.sh` in the source tree for the process to get this token.
22 Once you have your token of the form `Bearer $ACCESS_TOKEN`, you can use that in your prometheus config:
28 credentials: $ACCESS_TOKEN # this should have the bearer prefix removed
29 metrics_path: /api/v1/akkoma/metrics