Skip to content

Commit

Permalink
put query stats logging under s.debugLogging (thanos-io#7471)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeya24 authored and hczhu-db committed Aug 22, 2024
1 parent c99a85e commit fbaeb44
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -1670,10 +1670,12 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store
s.metrics.cachedPostingsCompressedSizeBytes.WithLabelValues(tenant).Add(float64(stats.CachedPostingsCompressedSizeSum))
s.metrics.postingsSizeBytes.WithLabelValues(tenant).Observe(float64(int(stats.PostingsFetchedSizeSum) + int(stats.PostingsTouchedSizeSum)))

level.Debug(logger).Log("msg", "stats query processed",
"request", req,
"tenant", tenant,
"stats", fmt.Sprintf("%+v", stats), "err", err)
if s.debugLogging {
level.Debug(logger).Log("msg", "stats query processed",
"request", req,
"tenant", tenant,
"stats", fmt.Sprintf("%+v", stats), "err", err)
}
}()

// Concurrently get data from all blocks.
Expand Down

0 comments on commit fbaeb44

Please sign in to comment.