Skip to content

Commit

Permalink
Support downsampling for /series.
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksey Sin <asin@ozon.ru>
  • Loading branch information
Aleksey Sin committed Jan 15, 2020
1 parent 46a97fd commit 70ef277
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/query/api/v1.go
Expand Up @@ -502,8 +502,11 @@ func (api *API) series(r *http.Request) (interface{}, []error, *ApiError) {
return nil, nil, apiErr
}

// TODO(bwplotka): Support downsampling?
q, err := api.queryableCreate(enableDedup, replicaLabels, 0, enablePartialResponse, true).
maxSourceResolution, apiErr := api.parseDownsamplingParamMillis(r, api.defaultInstantQueryMaxSourceResolution)
if apiErr != nil {
return nil, nil, apiErr
}
q, err := api.queryableCreate(enableDedup, replicaLabels, maxSourceResolution, enablePartialResponse, true).
Querier(r.Context(), timestamp.FromTime(start), timestamp.FromTime(end))
if err != nil {
return nil, nil, &ApiError{errorExec, err}
Expand Down

0 comments on commit 70ef277

Please sign in to comment.