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

Function NewScopedAttribute

pkg/traceql/ast.go:1332–1345  ·  view source on GitHub ↗

NewScopedAttribute creates a new scopedattribute with the given identifier string. this handles parent, span, and resource scopes.

(scope AttributeScope, parent bool, att string)

Source from the content-addressed store, hash-verified

1330// NewScopedAttribute creates a new scopedattribute with the given identifier string.
1331// this handles parent, span, and resource scopes.
1332func NewScopedAttribute(scope AttributeScope, parent bool, att string) Attribute {
1333 intrinsic := IntrinsicNone
1334 // if we are explicitly passed a resource or span scopes then we shouldn't parse for intrinsic
1335 if scope == AttributeScopeNone && !parent {
1336 intrinsic = intrinsicFromString(att)
1337 }
1338
1339 return Attribute{
1340 Scope: scope,
1341 Parent: parent,
1342 Name: att,
1343 Intrinsic: intrinsic,
1344 }
1345}
1346
1347func NewIntrinsic(n Intrinsic) Attribute {
1348 return Attribute{

Callers 15

tagValuesRunnerFunction · 0.92
checkConditionsFunction · 0.92
newSpanAttrFunction · 0.92
newResAttrFunction · 0.92
newInstrumentationAttrsFunction · 0.92
newEventAttrFunction · 0.92
newLinkAttrFunction · 0.92
flattenForSelectAllFunction · 0.92
checkConditionsFunction · 0.92
newSpanAttrFunction · 0.92

Calls 1

intrinsicFromStringFunction · 0.85