Metrics: Replace redundant metrics by aliases

This commit is contained in:
Raphael Michel
2017-03-27 22:24:35 +02:00
parent bcdb4fd000
commit 2f6e36c504
4 changed files with 31 additions and 23 deletions

View File

@@ -38,8 +38,9 @@ def serve_metrics(request):
m = metrics.metric_values()
output = []
for metric, value in m.items():
output.append("{} {}".format(metric, str(value)))
for metric, sub in m.items():
for label, value in sub.items():
output.append("{}{} {}".format(metric, label, str(value)))
content = "\n".join(output) + "\n"