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

Function StaticFromAnyValue

pkg/traceql/engine.go:481–494  ·  view source on GitHub ↗
(a *common_v1.AnyValue)

Source from the content-addressed store, hash-verified

479}
480
481func StaticFromAnyValue(a *common_v1.AnyValue) Static {
482 switch v := a.Value.(type) {
483 case *common_v1.AnyValue_StringValue:
484 return NewStaticString(v.StringValue)
485 case *common_v1.AnyValue_IntValue:
486 return NewStaticInt(int(v.IntValue))
487 case *common_v1.AnyValue_BoolValue:
488 return NewStaticBool(v.BoolValue)
489 case *common_v1.AnyValue_DoubleValue:
490 return NewStaticFloat(v.DoubleValue)
491 default:
492 return NewStaticNil()
493 }
494}

Callers 7

flattenForSelectAllFunction · 0.92
flattenForSelectAllFunction · 0.92
CombineMethod · 0.85
aggregateExemplarsMethod · 0.85
getLabelsFunction · 0.85
LabelsFromProtoFunction · 0.85

Calls 5

NewStaticStringFunction · 0.85
NewStaticIntFunction · 0.85
NewStaticBoolFunction · 0.85
NewStaticFloatFunction · 0.85
NewStaticNilFunction · 0.85

Tested by 2

flattenForSelectAllFunction · 0.74
flattenForSelectAllFunction · 0.74