Upgrade Prometheus client

This commit is contained in:
Danilo Peixoto
2023-08-05 19:06:11 -03:00
committed by GitHub
parent 67938581d9
commit e6e92365d2
3 changed files with 11 additions and 6 deletions

View File

@@ -22,8 +22,12 @@ class Generator:
for name in dir(jupyterhub.metrics):
obj = getattr(jupyterhub.metrics, name)
if obj.__class__.__module__.startswith('prometheus_client.'):
for metric in obj.describe():
table_rows.append([metric.type, metric.name, metric.documentation])
description = obj.describe()[0]
table_rows.append([
description.type,
description.name,
description.documentation,
])
return table_rows
def prometheus_metrics(self):