Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bartlomiej Plotka <[email protected]>
Signed-off-by: Vladimir Kononov <[email protected]>
  • Loading branch information
krya-kryak and bwplotka committed Jan 27, 2021
1 parent 87e84da commit 7c44b87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/queryfrontend/downsampled.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ func DownsampledMiddleware(merger queryrange.Merger, registerer prometheus.Regis
return downsampled{
next: next,
merger: merger,
extraCounter: promauto.With(registerer).NewCounter(prometheus.CounterOpts{
additionalQueriesCount: promauto.With(registerer).NewCounter(prometheus.CounterOpts{
Namespace: "thanos",
Name: "frontend_downsampled_extra_queries_total",
Help: "Total number of extra queries for downsampled data",
Help: "Total number of additional queries for downsampled data",
}),
}
})
Expand All @@ -33,7 +33,7 @@ type downsampled struct {
merger queryrange.Merger

// Metrics.
extraCounter prometheus.Counter
additionalQueriesCount prometheus.Counter
}

var resolutions = []int64{downsample.ResLevel1, downsample.ResLevel2}
Expand All @@ -54,7 +54,7 @@ func (d downsampled) Do(ctx context.Context, req queryrange.Request) (queryrange
forLoop:
for i < len(resolutions) {
if i > 0 {
d.extraCounter.Inc()
d.additionalQueriesCount.Inc()
}
r := *tqrr
resp, err = d.next.Do(ctx, &r)
Expand Down

0 comments on commit 7c44b87

Please sign in to comment.