(ctx context.Context, name string, hints *storage.LabelHints, matchers ...*labels.Matcher)
| 237 | } |
| 238 | |
| 239 | func (q *distributorQuerier) LabelValues(ctx context.Context, name string, hints *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error) { |
| 240 | var ( |
| 241 | lvs []string |
| 242 | err error |
| 243 | ) |
| 244 | |
| 245 | partialDataEnabled := q.partialDataEnabled(ctx) |
| 246 | |
| 247 | if q.streamingMetadata { |
| 248 | lvs, err = q.labelsWithRetry(ctx, func() ([]string, error) { |
| 249 | return q.distributor.LabelValuesForLabelNameStream(ctx, model.Time(q.mint), model.Time(q.maxt), model.LabelName(name), hints, partialDataEnabled, matchers...) |
| 250 | }) |
| 251 | } else { |
| 252 | lvs, err = q.labelsWithRetry(ctx, func() ([]string, error) { |
| 253 | return q.distributor.LabelValuesForLabelName(ctx, model.Time(q.mint), model.Time(q.maxt), model.LabelName(name), hints, partialDataEnabled, matchers...) |
| 254 | }) |
| 255 | } |
| 256 | |
| 257 | if partialdata.IsPartialDataError(err) { |
| 258 | warnings := annotations.Annotations(nil) |
| 259 | return lvs, warnings.Add(err), nil |
| 260 | } |
| 261 | |
| 262 | return lvs, nil, err |
| 263 | } |
| 264 | |
| 265 | func (q *distributorQuerier) LabelNames(ctx context.Context, hints *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error) { |
| 266 | partialDataEnabled := q.partialDataEnabled(ctx) |
nothing calls this directly
no test coverage detected