aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-12-05 17:49:46 +0000
committerChristopher Baines <mail@cbaines.net>2020-12-05 17:50:03 +0000
commit6d9f8c57eb37dc5b6ca49a0f4cce8b83b752c169 (patch)
treebc463528426d1cec389832a642c0ffca500fc337
parentfba2005362ce234fefa92e6ad00e499262b3ec4e (diff)
downloadprometheus-6d9f8c57eb37dc5b6ca49a0f4cce8b83b752c169.tar
prometheus-6d9f8c57eb37dc5b6ca49a0f4cce8b83b752c169.tar.gz
Fix metric # TYPE for histograms
-rw-r--r--prometheus.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/prometheus.scm b/prometheus.scm
index 53859c5..4dd750d 100644
--- a/prometheus.scm
+++ b/prometheus.scm
@@ -388,7 +388,10 @@ so that it can receive and store the metric values."
docstring)))
(simple-format port "# TYPE ~A ~A\n"
- full-name (metric-type metric))
+ full-name
+ (match (metric-type metric)
+ ((? histogram-metric-type? type) 'histogram)
+ (type type)))
(hash-for-each
(lambda (label-values value)