From 460ea5edefaa882e57417b53320cb99e126e2e62 Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Wed, 19 Jun 2024 12:43:30 -0700 Subject: [PATCH] put query stats logging under s.debugLogging (#7471) --- pkg/store/bucket.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/store/bucket.go b/pkg/store/bucket.go index 0bfbdc48fd..e342893cc7 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -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.