File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1987,12 +1987,17 @@ def update_current_gain_ref(
19871987def inspect_prometheus_metrics (
19881988 metric_name : str ,
19891989):
1990+ """
1991+ A debugging endpoint that returns the current contents of any Prometheus
1992+ gauges and counters that have been set up thus far.
1993+ """
1994+
19901995 # Extract the Prometheus metric defined in the Prometheus module
19911996 metric : Optional [Counter | Gauge ] = getattr (prom , metric_name , None )
19921997 if metric is None or not isinstance (metric , (Counter , Gauge )):
19931998 raise LookupError ("No matching metric was found" )
19941999
1995- # Print out contents
2000+ # Package contents into dict and return
19962001 results = {}
19972002 if hasattr (metric , "_metrics" ):
19982003 for i , (label_tuple , sub_metric ) in enumerate (metric ._metrics .items ()):
You can’t perform that action at this time.
0 commit comments