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

Function bucketizeDuration

pkg/traceql/ast_metrics.go:181–188  ·  view source on GitHub ↗
(s Span)

Source from the content-addressed store, hash-verified

179}
180
181func bucketizeDuration(s Span) (Static, bool) {
182 d := s.DurationNanos()
183 if d < 2 {
184 return NewStaticNil(), false
185 }
186 // Bucket is in seconds
187 return NewStaticFloat(Log2Bucketize(d) / float64(time.Second)), true
188}
189
190// exemplarAttribute captures a closure around the attribute so it doesn't have to be passed along with every span.
191// should be more efficient.

Callers

nothing calls this directly

Calls 4

NewStaticNilFunction · 0.85
NewStaticFloatFunction · 0.85
Log2BucketizeFunction · 0.85
DurationNanosMethod · 0.65

Tested by

no test coverage detected