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.
lagertonne added 1 commit 2024-12-21 21:17:38 +00:00
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 to c3395093c7 2024-12-23 10:31:55 +00:00 Compare
lagertonne force-pushed lagertonne/more-metrics-2 from c3395093c7 to 7add159d23 2024-12-23 10:32:15 +00:00 Compare
lagertonne force-pushed lagertonne/more-metrics-2 from 7add159d23 to e43845b7dc 2024-12-23 10:38:34 +00:00 Compare
lagertonne force-pushed lagertonne/more-metrics-2 from e43845b7dc to cf14a029bb 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.
j3d1 was assigned by lagertonne 2024-12-23 10:45:30 +00:00
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.