Skip to content

Commit

Permalink
fix time parameter propagation in labels API
Browse files Browse the repository at this point in the history
Signed-off-by: yeya24 <yb532204897@gmail.com>
  • Loading branch information
yeya24 committed Jun 19, 2020
1 parent b05e50c commit 94ae577
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/prometheus/v1/api.go
Original file line number Diff line number Diff line change
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 94ae577

Please sign in to comment.