Set gauge to 1 when collector is successful

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Khiem Doan <doankhiem.crazy@gmail.com>
This commit is contained in:
Julien Pivotto 2022-11-24 14:02:37 +01:00 committed by Khiem Doan
parent 02aff21cf7
commit dc1c19efd4

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{})