Check the value for metric-set

This commit is contained in:
Christopher Baines 2025-11-19 12:31:56 +00:00
parent bf28a0deb9
commit 4d1044bc16

View file

@ -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)