Skip to content

Commit

Permalink
fixed: issue #5011 that impacted exemplars appearing in Grafana (#5014)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Grave <[email protected]>
  • Loading branch information
paulgrav authored Jan 1, 2022
1 parent 1448e12 commit 5c574a9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/api/query/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"strings"
"time"

cortexutil "github.com/cortexproject/cortex/pkg/util"
"github.com/go-kit/log"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
Expand Down Expand Up @@ -821,18 +820,18 @@ func NewExemplarsHandler(client exemplars.UnaryClient, enablePartialResponse boo
err error
)

start, err := cortexutil.ParseTime(r.FormValue("start"))
start, err := parseTimeParam(r, "start", infMinTime)
if err != nil {
return nil, nil, &api.ApiError{Typ: api.ErrorBadData, Err: err}
}
end, err := cortexutil.ParseTime(r.FormValue("end"))
end, err := parseTimeParam(r, "end", infMaxTime)
if err != nil {
return nil, nil, &api.ApiError{Typ: api.ErrorBadData, Err: err}
}

req := &exemplarspb.ExemplarsRequest{
Start: start,
End: end,
Start: timestamp.FromTime(start),
End: timestamp.FromTime(end),
Query: r.FormValue("query"),
PartialResponseStrategy: ps,
}
Expand Down

0 comments on commit 5c574a9

Please sign in to comment.