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

Function normalizeTraceIDOperand

pkg/traceql/ast.go:583–590  ·  view source on GitHub ↗

normalizeTraceIDOperand normalizes a Static operand for trace ID

(operand Static)

Source from the content-addressed store, hash-verified

581
582// normalizeTraceIDOperand normalizes a Static operand for trace ID
583func normalizeTraceIDOperand(operand Static) Static {
584 if operand.Type != TypeString {
585 return operand
586 }
587 traceID := operand.EncodeToString(false)
588 traceID = strings.TrimLeft(traceID, "0")
589 return NewStaticString(traceID)
590}
591
592// nolint: revive
593func (BinaryOperation) __fieldExpression() {}

Callers 1

newBinaryOperationFunction · 0.85

Calls 2

NewStaticStringFunction · 0.85
EncodeToStringMethod · 0.80

Tested by

no test coverage detected