Skip to content

Commit

Permalink
Merge pull request #771 from yeya24/fix-time-range-propagation
Browse files Browse the repository at this point in the history
Fix time parameter propagation in labels API
  • Loading branch information
beorn7 committed Jun 22, 2020
2 parents 0238879 + 94ae577 commit 3df22a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/prometheus/v1/api.go
Expand Up @@ -682,6 +682,8 @@ func (h *httpAPI) LabelNames(ctx context.Context, startTime time.Time, endTime t
q.Set("start", formatTime(startTime))
q.Set("end", formatTime(endTime))

u.RawQuery = q.Encode()

req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, nil, err
Expand All @@ -700,6 +702,8 @@ func (h *httpAPI) LabelValues(ctx context.Context, label string, startTime time.
q.Set("start", formatTime(startTime))
q.Set("end", formatTime(endTime))

u.RawQuery = q.Encode()

req, err := http.NewRequest(http.MethodGet, u.String(), nil)
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit 3df22a4

Please sign in to comment.