(t *testing.T, _ *tempopb.Trace, wantMeta *tempopb.TraceSearchMetadata, _, _ []*tempopb.SearchRequest, meta *backend.BlockMeta, r Reader, _ common.BackendBlock)
| 538 | } |
| 539 | |
| 540 | func traceQLStructural(t *testing.T, _ *tempopb.Trace, wantMeta *tempopb.TraceSearchMetadata, _, _ []*tempopb.SearchRequest, meta *backend.BlockMeta, r Reader, _ common.BackendBlock) { |
| 541 | ctx := context.Background() |
| 542 | e := traceql.NewEngine() |
| 543 | |
| 544 | type test struct { |
| 545 | req *tempopb.SearchRequest |
| 546 | expected []*tempopb.TraceSearchMetadata |
| 547 | } |
| 548 | |
| 549 | searchesThatMatch := []*test{ |
| 550 | { |
| 551 | req: &tempopb.SearchRequest{Query: "{ .parent } >> { .child }"}, |
| 552 | expected: []*tempopb.TraceSearchMetadata{ |
| 553 | { |
| 554 | SpanSets: []*tempopb.SpanSet{ |
| 555 | { |
| 556 | Spans: []*tempopb.Span{ |
| 557 | { |
| 558 | SpanID: "0000000000010203", |
| 559 | StartTimeUnixNano: 1000000000000, |
| 560 | DurationNanos: 1000000000, |
| 561 | Name: "", |
| 562 | Attributes: []*v1_common.KeyValue{ |
| 563 | {Key: "child", Value: &v1_common.AnyValue{Value: &v1_common.AnyValue_BoolValue{BoolValue: true}}}, |
| 564 | }, |
| 565 | }, |
| 566 | }, |
| 567 | Matched: 1, |
| 568 | }, |
| 569 | }, |
| 570 | }, |
| 571 | }, |
| 572 | }, |
| 573 | { |
| 574 | req: &tempopb.SearchRequest{Query: "{ .child } << { .parent }"}, |
| 575 | expected: []*tempopb.TraceSearchMetadata{ |
| 576 | { |
| 577 | SpanSets: []*tempopb.SpanSet{ |
| 578 | { |
| 579 | Spans: []*tempopb.Span{ |
| 580 | { |
| 581 | SpanID: "0000000000040506", |
| 582 | StartTimeUnixNano: 1000000000000, |
| 583 | DurationNanos: 2000000000, |
| 584 | Name: "", |
| 585 | Attributes: []*v1_common.KeyValue{ |
| 586 | {Key: "parent", Value: &v1_common.AnyValue{Value: &v1_common.AnyValue_BoolValue{BoolValue: true}}}, |
| 587 | }, |
| 588 | }, |
| 589 | }, |
| 590 | Matched: 1, |
| 591 | }, |
| 592 | }, |
| 593 | }, |
| 594 | }, |
| 595 | }, |
| 596 | { |
| 597 | req: &tempopb.SearchRequest{Query: "{ .parent } > { .child }"}, |
nothing calls this directly
no test coverage detected