Skip to content

Commit

Permalink
add logic
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <yb532204897@gmail.com>
  • Loading branch information
yeya24 committed Oct 23, 2020
1 parent ad540e2 commit 6d30e5d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/queryfrontend/roundtrip.go
Expand Up @@ -144,11 +144,13 @@ func newQueryRangeTripperware(
m := queryrange.NewInstrumentMiddlewareMetrics(reg)

// step align middleware.
queryRangeMiddleware = append(
queryRangeMiddleware,
queryrange.InstrumentMiddleware("step_align", m),
queryrange.StepAlignMiddleware,
)
if config.AlignQueriesWithStep {
queryRangeMiddleware = append(
queryRangeMiddleware,
queryrange.InstrumentMiddleware("step_align", m),
queryrange.StepAlignMiddleware,
)
}

queryIntervalFn := func(_ queryrange.Request) time.Duration {
return config.SplitQueriesByInterval
Expand Down

0 comments on commit 6d30e5d

Please sign in to comment.