metrics: Make metrics actually usable #104

Merged
lagertonne merged 2 commits from lagertonne/more-metrics-2 into testing 2024-12-23 13:20:45 +00:00
Owner

Somehow, the metrics weren't actually updated when using the workaround with the command. I guess something is going on with django-prometheus and the prometheus_client module.

This fix has another approach: The gauge is now updated on every request. This could potentially be a performance issue, but count-commands should be fast enough from the db side, and we limit who can access the endpoint.

Also, it counts all the objects.

Somehow, the metrics weren't actually updated when using the workaround with the command. I guess something is going on with django-prometheus and the prometheus_client module. This fix has another approach: The gauge is now updated on every request. This could potentially be a performance issue, but count-commands should be fast enough from the db side, and we limit who can access the endpoint. Also, it counts *all* the objects.
metrics: Make metrics actually usable
All checks were successful
/ test (push) Successful in 2m52s
/ test (pull_request) Successful in 2m38s
2e4629d45e
lagertonne changed title from WIP: metrics: Make metrics actually usable to metrics: Make metrics actually usable 2024-12-23 09:02:55 +00:00
lagertonne force-pushed lagertonne/more-metrics-2 from 2e4629d45e
All checks were successful
/ test (push) Successful in 2m52s
/ test (pull_request) Successful in 2m38s
to c3395093c7
Some checks failed
/ test (push) Has been cancelled
/ test (pull_request) Successful in 2m36s
2024-12-23 10:31:55 +00:00
Compare
lagertonne force-pushed lagertonne/more-metrics-2 from c3395093c7
Some checks failed
/ test (push) Has been cancelled
/ test (pull_request) Successful in 2m36s
to 7add159d23
All checks were successful
/ test (push) Successful in 2m31s
/ test (pull_request) Successful in 2m37s
2024-12-23 10:32:15 +00:00
Compare
lagertonne force-pushed lagertonne/more-metrics-2 from 7add159d23
All checks were successful
/ test (push) Successful in 2m31s
/ test (pull_request) Successful in 2m37s
to e43845b7dc
All checks were successful
/ test (push) Successful in 2m35s
/ test (pull_request) Successful in 2m32s
2024-12-23 10:38:34 +00:00
Compare
lagertonne force-pushed lagertonne/more-metrics-2 from e43845b7dc
All checks were successful
/ test (push) Successful in 2m35s
/ test (pull_request) Successful in 2m32s
to cf14a029bb
All checks were successful
/ test (push) Successful in 2m37s
/ test (pull_request) Successful in 2m37s
2024-12-23 10:43:29 +00:00
Compare
Author
Owner

If the test run through, this should be merge-able.

If the test run through, this should be merge-able.
lagertonne merged commit 2886d887f5 into testing 2024-12-23 13:20:45 +00:00
lagertonne deleted branch lagertonne/more-metrics-2 2024-12-23 13:20:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
c3lf/c3lf-system-3!104
No description provided.