mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
parent
8763dedb9d
commit
3abb2cc349
|
@ -68,9 +68,9 @@ func (q *querier) Close() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// ExternablLabelsHandler returns a storage.Queryable which creates a
|
||||
// ExternalLabelsHandler returns a storage.Queryable which creates a
|
||||
// externalLabelsQuerier.
|
||||
func ExternablLabelsHandler(next storage.Queryable, externalLabels model.LabelSet) storage.Queryable {
|
||||
func ExternalLabelsHandler(next storage.Queryable, externalLabels model.LabelSet) storage.Queryable {
|
||||
return storage.QueryableFunc(func(ctx context.Context, mint, maxt int64) (storage.Querier, error) {
|
||||
q, err := next.Querier(ctx, mint, maxt)
|
||||
if err != nil {
|
||||
|
|
|
@ -107,7 +107,7 @@ func (s *Storage) ApplyConfig(conf *config.Config) error {
|
|||
}
|
||||
|
||||
q := QueryableClient(c)
|
||||
q = ExternablLabelsHandler(q, conf.GlobalConfig.ExternalLabels)
|
||||
q = ExternalLabelsHandler(q, conf.GlobalConfig.ExternalLabels)
|
||||
if len(rrConf.RequiredMatchers) > 0 {
|
||||
q = RequiredMatchersFilter(q, labelsToEqualityMatchers(rrConf.RequiredMatchers))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue