Matches returns true if the given span matches the policy.
(span *tracev1.Span)
| 20 | |
| 21 | // Matches returns true if the given span matches the policy. |
| 22 | func (p *IntrinsicPolicyMatch) Matches(span *tracev1.Span) bool { |
| 23 | if len(p.filters) == 0 { |
| 24 | return true |
| 25 | } |
| 26 | for _, attr := range p.filters { |
| 27 | if !attr.Matches(span) { |
| 28 | return false |
| 29 | } |
| 30 | } |
| 31 | return true |
| 32 | } |
| 33 | |
| 34 | // IntrinsicFilter is a filter that matches spans based on their intrinsic attributes. |
| 35 | type IntrinsicFilter struct { |