Skip to content

Commit

Permalink
chore(analytics): Reduce logging for the analytics package (#16379)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena authored Feb 25, 2025
1 parent ca41297 commit 23b5f12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/analytics/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (rep *Reporter) running(ctx context.Context) error {
}
level.Debug(rep.logger).Log("msg", "reporting cluster stats", "date", time.Now())
if err := rep.reportUsage(ctx, next); err != nil {
level.Info(rep.logger).Log("msg", "failed to report usage", "err", err)
level.Debug(rep.logger).Log("msg", "failed to report usage", "err", err)
continue
}
rep.lastReport = next
Expand All @@ -340,12 +340,10 @@ func (rep *Reporter) reportUsage(ctx context.Context, interval time.Time) error
var errs multierror.MultiError
for backoff.Ongoing() {
if err := sendReport(ctx, rep.cluster, interval, rep.conf.UsageStatsURL, rep.httpClient); err != nil {
level.Info(rep.logger).Log("msg", "failed to send usage report", "retries", backoff.NumRetries(), "err", err)
errs.Add(err)
backoff.Wait()
continue
}
level.Debug(rep.logger).Log("msg", "usage report sent with success")
return nil
}
return errs.Err()
Expand Down

0 comments on commit 23b5f12

Please sign in to comment.