@@ -232,7 +232,7 @@ type API interface {
232232 // Flags returns the flag values that Prometheus was launched with.
233233 Flags (ctx context.Context ) (FlagsResult , error )
234234 // LabelNames returns all the unique label names present in the block in sorted order.
235- LabelNames (ctx context.Context ) ([]string , Warnings , error )
235+ LabelNames (ctx context.Context , startTime time. Time , endTime time. Time ) ([]string , Warnings , error )
236236 // LabelValues performs a query for the values of the given label.
237237 LabelValues (ctx context.Context , label string ) (model.LabelValues , Warnings , error )
238238 // Query performs a query for the given time.
@@ -676,8 +676,12 @@ func (h *httpAPI) Runtimeinfo(ctx context.Context) (RuntimeinfoResult, error) {
676676 return res , json .Unmarshal (body , & res )
677677}
678678
679- func (h * httpAPI ) LabelNames (ctx context.Context ) ([]string , Warnings , error ) {
679+ func (h * httpAPI ) LabelNames (ctx context.Context , startTime time. Time , endTime time. Time ) ([]string , Warnings , error ) {
680680 u := h .client .URL (epLabels , nil )
681+ q := u .Query ()
682+ q .Set ("start" , formatTime (startTime ))
683+ q .Set ("end" , formatTime (endTime ))
684+
681685 req , err := http .NewRequest (http .MethodGet , u .String (), nil )
682686 if err != nil {
683687 return nil , nil , err
0 commit comments