Skip to content

Commit

Permalink
Add some erroring message and increase timeout to catch edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Stylianos Rigas authored and Stylianos Rigas committed Mar 14, 2024
1 parent 0f3be4c commit 7b7ad10
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/elrond/elrond_soak.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ func querySLOMetrics(ring *model.Ring, url string, queryTime time.Time, logger *
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
logger.Infof("Running Thanos query %s, attempt %d", query, attempt+1)
result, warnings, err := v1api.Query(ctx, query, queryTime)
if err != nil {
if errors.Is(err, context.DeadlineExceeded) {
logger.Errorf("Query failed due to timeout: %v", err)
} else {
logger.Errorf("Query failed due to an error: %v", err)
}
}
cancel()

if err == nil {
Expand Down

0 comments on commit 7b7ad10

Please sign in to comment.