(ctx context.Context, req *tempopb.SearchRequest, _ common.SearchOptions)
| 614 | } |
| 615 | |
| 616 | func (b *walBlock) Search(ctx context.Context, req *tempopb.SearchRequest, _ common.SearchOptions) (*tempopb.SearchResponse, error) { |
| 617 | ctx, span := tracer.Start(ctx, "walBlock.Search") |
| 618 | defer span.End() |
| 619 | |
| 620 | results := &tempopb.SearchResponse{ |
| 621 | Metrics: &tempopb.SearchMetrics{}, |
| 622 | } |
| 623 | |
| 624 | for i, blockFlush := range b.readFlushes() { |
| 625 | file, err := blockFlush.file(ctx) |
| 626 | if err != nil { |
| 627 | return nil, fmt.Errorf("error opening file %s: %w", blockFlush.path, err) |
| 628 | } |
| 629 | |
| 630 | defer file.Close() |
| 631 | pf := file.parquetFile |
| 632 | |
| 633 | r, err := searchParquetFile(ctx, pf, req, pf.RowGroups(), b.meta.DedicatedColumns) |
| 634 | if err != nil { |
| 635 | return nil, fmt.Errorf("error searching block [%s %d]: %w", b.meta.BlockID.String(), i, err) |
| 636 | } |
| 637 | |
| 638 | results.Traces = append(results.Traces, r.Traces...) |
| 639 | results.Metrics.InspectedBytes += file.r.BytesRead() |
| 640 | results.Metrics.InspectedTraces += uint32(pf.NumRows()) |
| 641 | if len(results.Traces) >= int(req.Limit) { |
| 642 | break |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | return results, nil |
| 647 | } |
| 648 | |
| 649 | func (b *walBlock) SearchTags(ctx context.Context, scope traceql.AttributeScope, cb common.TagsCallback, mcb common.MetricsCallback, _ common.SearchOptions) error { |
| 650 | ctx, span := tracer.Start(ctx, "walBlock.SearchTags") |
nothing calls this directly
no test coverage detected