diff --git a/prometheus.scm b/prometheus.scm index 83061a7..d6caa6a 100644 --- a/prometheus.scm +++ b/prometheus.scm @@ -350,6 +350,12 @@ values are the values." '(gauge)) (error "can only set gauge metrics")) + (unless (number? value) + (raise-exception + (make-exception-with-message + (simple-format #f "metric-set value must be a number: ~A" + value)))) + (call-with-blocked-asyncs (lambda () (with-mutex (metric-mutex metric)