Merge pull request #771 from yeya24/fix-time-range-propagation

Fix time parameter propagation in labels API
This commit is contained in:
Björn Rabenstein 2020-06-22 18:35:43 +02:00 committed by GitHub
commit 3df22a4779
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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
@ -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