Skip to content

Commit

Permalink
Also log if the probe has a timeout
Browse files Browse the repository at this point in the history
Currently the logs don't indicate at all that the probes are failing if
there are timeouts. We only export that information.

This makes it hard to find these, as the Sloth metrics don't indicate
the type of errors. We have to look at the raw SLI metrics to find out
that there are timeouts.
  • Loading branch information
Kidswiss committed May 7, 2024
1 parent 83e036a commit a6ca6a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sliexporter/probes/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (m Manager) sendProbe(ctx context.Context, p Prober) {
prometheus.Labels{"reason": "success"},
).Observe(latency.Seconds())
case errors.Is(err, ErrTimeout) || errors.Is(ctx.Err(), context.DeadlineExceeded):
l.V(0).Error(err, "Probe Timeout")
o.With(
prometheus.Labels{"reason": "fail-timeout"},
).Observe(latency.Seconds())
Expand Down

0 comments on commit a6ca6a9

Please sign in to comment.