MCPcopy
hub / github.com/grafana/tempo / Search

Method Search

tempodb/tempodb.go:422–430  ·  view source on GitHub ↗

Search the given block. This method takes the pre-loaded block meta instead of a block ID, which eliminates a read per search request.

(ctx context.Context, meta *backend.BlockMeta, req *tempopb.SearchRequest, opts common.SearchOptions)

Source from the content-addressed store, hash-verified

420// Search the given block. This method takes the pre-loaded block meta instead of a block ID, which
421// eliminates a read per search request.
422func (rw *readerWriter) Search(ctx context.Context, meta *backend.BlockMeta, req *tempopb.SearchRequest, opts common.SearchOptions) (*tempopb.SearchResponse, error) {
423 block, err := encoding.OpenBlock(meta, rw.r)
424 if err != nil {
425 return nil, err
426 }
427
428 rw.cfg.Search.ApplyToOptions(&opts)
429 return block.Search(ctx, req, opts)
430}
431
432func (rw *readerWriter) SearchTags(ctx context.Context, meta *backend.BlockMeta, req *tempopb.SearchTagsBlockRequest, opts common.SearchOptions) (*tempopb.SearchTagsV2Response, error) {
433 scope := req.SearchReq.Scope

Callers

nothing calls this directly

Calls 3

OpenBlockFunction · 0.92
ApplyToOptionsMethod · 0.80
SearchMethod · 0.65

Tested by

no test coverage detected