feat: add metric label for scache load

localhost:3001/metrics now includes:

pgrst_schema_cache_loads_total{status="FAIL"} 352.0
pgrst_schema_cache_loads_total{status="SUCCESS"} 3.0

This allows testing the failure case on:

https://github.com/PostgREST/postgrest/issues/3424#issuecomment-2104904910
This commit is contained in:
steve-chavez
2024-05-14 17:57:21 -05:00
committed by Steve Chavez
parent 05447bae33
commit d25df459ea
3 changed files with 63 additions and 22 deletions
+4 -3
View File
@@ -109,9 +109,10 @@ The query time in seconds of the last schema cache load.
pgrst_schema_cache_loads_total
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
======== =======
**Type** Counter
======== =======
========== ==========================
**Type** Counter
**Labels** ``status``: SUCCESS | FAIL
========== ==========================
The total number of times the schema cache was loaded.