(ctx context.Context, from, to model.Time, matchers ...[]*labels.Matcher)
| 27 | ) |
| 28 | |
| 29 | func (d *Distributor) QueryExemplars(ctx context.Context, from, to model.Time, matchers ...[]*labels.Matcher) (*ingester_client.ExemplarQueryResponse, error) { |
| 30 | var result *ingester_client.ExemplarQueryResponse |
| 31 | err := instrument.CollectedRequest(ctx, "Distributor.QueryExemplars", d.queryDuration, instrument.ErrorCode, func(ctx context.Context) error { |
| 32 | req, err := ingester_client.ToExemplarQueryRequest(from, to, matchers...) |
| 33 | if err != nil { |
| 34 | return err |
| 35 | } |
| 36 | |
| 37 | // We ask for all ingesters without passing matchers because exemplar queries take in an array of array of label matchers. |
| 38 | replicationSet, err := d.GetIngestersForQuery(ctx) |
| 39 | if err != nil { |
| 40 | return err |
| 41 | } |
| 42 | |
| 43 | result, err = d.queryIngestersExemplars(ctx, replicationSet, req) |
| 44 | if err != nil { |
| 45 | return err |
| 46 | } |
| 47 | |
| 48 | if s := opentracing.SpanFromContext(ctx); s != nil { |
| 49 | s.LogKV("series", len(result.Timeseries)) |
| 50 | } |
| 51 | return nil |
| 52 | }) |
| 53 | return result, err |
| 54 | } |
| 55 | |
| 56 | // QueryStream multiple ingesters via the streaming interface and returns big ol' set of chunks. |
| 57 | func (d *Distributor) QueryStream(ctx context.Context, from, to model.Time, partialDataEnabled bool, matchers ...*labels.Matcher) (*ingester_client.QueryStreamResponse, error) { |
nothing calls this directly
no test coverage detected