NewScopedAttribute creates a new scopedattribute with the given identifier string. this handles parent, span, and resource scopes.
(scope AttributeScope, parent bool, att string)
| 1330 | // NewScopedAttribute creates a new scopedattribute with the given identifier string. |
| 1331 | // this handles parent, span, and resource scopes. |
| 1332 | func 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 | |
| 1347 | func NewIntrinsic(n Intrinsic) Attribute { |
| 1348 | return Attribute{ |