From 0272269bdba0ab278bb370a0b03725a85fc265b9 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 6270f5a1e3..75a85dd9fb 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -1660,10 +1660,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.