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

Function FloatizeAttribute

pkg/traceql/engine_metrics.go:2130–2141  ·  view source on GitHub ↗
(s Span, a Attribute)

Source from the content-addressed store, hash-verified

2128)
2129
2130func FloatizeAttribute(s Span, a Attribute) (float64, StaticType) {
2131 v, ok := s.AttributeFor(a)
2132 if !ok {
2133 return 0, TypeNil
2134 }
2135
2136 f := v.Float()
2137 if math.IsNaN(f) {
2138 return 0, TypeNil
2139 }
2140 return f, v.Type
2141}
2142
2143// convertProtoLabelsToTraceQL converts protobuf labels to traceql Labels format.
2144// If skipBucket is true, it will skip any label with key matching internalLabelBucket.

Callers 4

newAvgAggregatorFunction · 0.85
NewOverTimeAggregatorFunction · 0.85
bucketizeAttributeFunction · 0.85
exemplarAttributeFunction · 0.85

Calls 2

FloatMethod · 0.80
AttributeForMethod · 0.65

Tested by

no test coverage detected