Skip to content

Commit

Permalink
GUAGES NOT COUNTERS UNLESS DOING FANCY
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhodges committed Aug 29, 2024
1 parent 04e30a2 commit f0a0f9d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/autograph-monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,19 @@ func main() {
successes := expvar.NewInt("monitoring.successes")
errors := expvar.NewInt("monitoring.errors")

attempts.Add(1)
attempts.Set(1)
err := monitor(client)
if err != nil {
errors.Add(1)
errors.Set(1)
log.Printf("error running monitor: %s", err)
} else {
successes.Add(1)
successes.Set(1)
}

timer := time.NewTimer(scheduleDur)
for range timer.C {
attempts.Add(1)
successes.Set(0)
errors.Set(0)
err := monitor(client)
if err != nil {
errors.Add(1)
Expand Down

0 comments on commit f0a0f9d

Please sign in to comment.