feat: Add Prometheus metrics for requests

Adds gauge for requests by type and status

Signed-off-by: moson <moson@archlinux.org>
This commit is contained in:
moson 2023-07-23 22:46:44 +02:00
parent e45878a058
commit 375895f080
No known key found for this signature in database
GPG key ID: 4A4760AB4EE15296
3 changed files with 31 additions and 3 deletions

View file

@ -24,6 +24,12 @@ PACKAGES = Gauge(
["state"],
multiprocess_mode="livemax",
)
REQUESTS = Gauge(
"aur_requests",
"Number of AUR requests by type and status",
["type", "status"],
multiprocess_mode="livemax",
)
def instrumentator():