Set gauge to 1 when collector is successful

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
Julien Pivotto 2022-11-24 14:02:37 +01:00
parent 02aff21cf7
commit 5fcceb4105

View File

@ -114,6 +114,7 @@ func handleProbe(logger log.Logger) http.HandlerFunc {
duration := time.Since(start).Seconds()
probeDurationGauge.Set(duration)
probeSuccessGauge.Set(1)
// TODO check success, etc
h := promhttp.HandlerFor(registry, promhttp.HandlerOpts{})