Skip to content

Commit

Permalink
Support downsampling for API method /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 7b59bca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/query/api/v1.go
Original file line number Diff line number Diff line change
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 7b59bca

Please sign in to comment.