Skip to content

Commit

Permalink
Remove excessive logging
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <[email protected]>
  • Loading branch information
chaudum committed Apr 29, 2024
1 parent d0b04e0 commit 1ec2b79
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions pkg/bloomgateway/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,6 @@ func convertToShortRef(ref *logproto.ChunkRef) *logproto.ShortRef {
return &logproto.ShortRef{From: ref.From, Through: ref.Through, Checksum: ref.Checksum}
}

func sum[S ~[]E, E any](s S, fn func(e E) int) int {
var count int
for i := range s {
count += fn(s[i])
}
return count
}

func (bq *BloomQuerier) FilterChunkRefs(ctx context.Context, tenant string, from, through model.Time, chunkRefs []*logproto.ChunkRef, queryPlan plan.QueryPlan) ([]*logproto.ChunkRef, error) {
// Shortcut that does not require any filtering
if !bq.limits.BloomGatewayEnabled(tenant) || len(chunkRefs) == 0 || len(v1.ExtractTestableLineFilters(queryPlan.AST)) == 0 {
Expand Down Expand Up @@ -123,20 +115,6 @@ func (bq *BloomQuerier) FilterChunkRefs(ctx context.Context, tenant string, from
return nil, err
}

level.Debug(bq.logger).Log(
"msg", "filter series by day",
"day", s.day.Time.Time(),
"from", s.interval.Start.Time(),
"through", s.interval.End.Time(),
"series_total", len(s.series),
"series_in_blocks", len(blocks),
"series_skipped", len(skipped),
"series_filtered", len(refs),
"chunks_total", sum(s.series, func(e *logproto.GroupedChunkRefs) int { return len(e.Refs) }), // slow
"chunks_filtered", sum(refs, func(e *logproto.GroupedChunkRefs) int { return len(e.Refs) }), // slow
"chunks_skipped", sum(skipped, func(e *logproto.GroupedChunkRefs) int { return len(e.Refs) }), // slow
)

// add chunk refs from series that were not mapped to any blocks
responses = append(responses, refs, skipped)
bq.metrics.seriesSkipped.Add(float64(len(skipped)))
Expand Down

0 comments on commit 1ec2b79

Please sign in to comment.