FIX: correctly handle cases where Gauge is set to nil

FIX: correctly handle cases where Gauge is set to nil

see: FIX: setting a Gauge to nil corrupts metrics

previously gauge.observe(nil) would not raise, but would corrupt
the payload

From d9baa8200b86360f8e63077dd47e8c78ba18eb61 Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Fri, 30 Nov 2018 12:47:24 +1100
Subject: [PATCH] FIX: correctly handle cases where Gauge is set to nil

see: https://review.discourse.org/t/fix-setting-a-gauge-to-nil-corrupts-metrics/416

previously `gauge.observe(nil)` would not raise, but would corrupt
the payload

diff --git a/prometheus_exporter_version b/prometheus_exporter_version
index 267577d..2b7c5ae 100644
--- a/prometheus_exporter_version
+++ b/prometheus_exporter_version
@@ -1 +1 @@
-0.4.1
+0.4.2

GitHub

1 Like