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

Method isSelection

pkg/traceql/engine_metrics_compare.go:98–111  ·  view source on GitHub ↗
(span Span, spanStartTime uint64)

Source from the content-addressed store, hash-verified

96}
97
98func (m *MetricsCompare) isSelection(span Span, spanStartTime uint64) Static {
99 // Determine if this span is inside the selection
100 isSelection := StaticFalse
101 if m.start > 0 && m.end > 0 {
102 // Timestamp filtering
103 if spanStartTime > uint64(m.start) && spanStartTime <= uint64(m.end) {
104 isSelection, _ = m.f.Expression.execute(span)
105 }
106 } else {
107 // No timestamp filtering
108 isSelection, _ = m.f.Expression.execute(span)
109 }
110 return isSelection
111}
112
113func (m *MetricsCompare) observe(span Span) {
114 // For performance, MetricsCompare doesn't use the Range/StepAggregator abstractions.

Callers 2

observeMethod · 0.95
observeExemplarMethod · 0.95

Calls 1

executeMethod · 0.65

Tested by

no test coverage detected