Documentation ¶
Overview ¶
Package otlp contains common types and functions used to convert OTLP Arrow entities into their OTLP representation.
Index ¶
- Variables
- func AttributesId(attrs pcommon.Map, b *strings.Builder)
- func AttributesStoreFrom[unsigned constraints.Unsigned](record arrow.Record, store *AttributesStore[unsigned]) error
- func ResourceID(r pcommon.Resource, schemaUrl string) string
- func ResourceIDFromRecord(record arrow.Record, row int, resIDs *ResourceIds) (uint16, error)
- func ScopeID(is pcommon.InstrumentationScope, schemaUrl string) string
- func ScopeIDFromRecord(record arrow.Record, row int, IDs *ScopeIds) (uint16, error)
- func UpdateResourceFromRecord(r pcommon.Resource, record arrow.Record, row int, resIds *ResourceIds, ...) (schemaUrl string, err error)
- func UpdateScopeFromRecord(s pcommon.InstrumentationScope, record arrow.Record, row int, ids *ScopeIds, ...) error
- func UpdateValueFrom(v pcommon.Value, vArr *array.SparseUnion, row int) error
- func ValueID(v pcommon.Value, b *strings.Builder)
- type AttributeFeeder
- type AttributeIDs
- type AttributesStore
- type AttrsParentIDDecoder
- type BinaryAttributeFeeder
- type BoolAttributeFeeder
- type CborAttributeFeeder
- type DoubleAttributeFeeder
- type DynAttrsStore
- type IntAttributeFeeder
- type ParentIDGetter
- type ResourceIds
- type ScopeIds
- type StringAttributeFeeder
Constants ¶
This section is empty.
Variables ¶
var ( ErrMissingRelatedData = errors.New("missing related data") ErrInvalidTypeCode = errors.New("invalid type code") ErrInvalidFieldId = errors.New("invalid field id") ErrParentIDMissing = errors.New("parent id missing") ErrInvalidAttrName = errors.New("invalid attribute name") ErrMissingTypeMetadata = errors.New("missing type metadata") )
Functions ¶
func AttributesStoreFrom ¶ added in v0.32.0
func AttributesStoreFrom[unsigned constraints.Unsigned](record arrow.Record, store *AttributesStore[unsigned]) error
AttributesStoreFrom creates an Attribute16Store from an arrow.Record. Note: This function doesn't release the record passed as argument. This is the responsibility of the caller
func ResourceIDFromRecord ¶
func ScopeIDFromRecord ¶
func UpdateResourceFromRecord ¶
func UpdateResourceFromRecord(r pcommon.Resource, record arrow.Record, row int, resIds *ResourceIds, attrsStore *AttributesStore[uint16]) (schemaUrl string, err error)
func UpdateScopeFromRecord ¶
func UpdateScopeFromRecord( s pcommon.InstrumentationScope, record arrow.Record, row int, ids *ScopeIds, attrsStore *AttributesStore[uint16], ) error
func UpdateValueFrom ¶
Types ¶
type AttributeFeeder ¶
type AttributeIDs ¶
type AttributeIDs struct { ParentID int ParentIDDeltaEncoded bool Key int Type int Str int Int int Double int Bool int Bytes int Ser int }
AttributeIDs is a struct containing the Arrow field IDs of the attributes.
func SchemaToAttributeIDs ¶
func SchemaToAttributeIDs(schema *arrow.Schema) (*AttributeIDs, error)
SchemaToAttributeIDs pre-computes the field IDs for the attributes record.
type AttributesStore ¶ added in v0.32.0
type AttributesStore[u constraints.Unsigned] struct { // contains filtered or unexported fields }
AttributesStore is a store for attributes. The attributes are stored in a map by ID. This ID represents the identifier of the main entity (span, event, link, etc.) to which the attributes are attached. So the maximum number of attributes per entity is not limited.
func NewAttributesStore ¶ added in v0.32.0
func NewAttributesStore[u constraints.Unsigned]() *AttributesStore[u]
NewAttributesStore creates a new AttributesStore.
func (*AttributesStore[u]) AttributesByDeltaID ¶ added in v0.32.0
func (s *AttributesStore[u]) AttributesByDeltaID(ID u) *pcommon.Map
AttributesByDeltaID returns the attributes for the given Delta ID.
func (*AttributesStore[u]) AttributesByID ¶ added in v0.32.0
func (s *AttributesStore[u]) AttributesByID(ID u) *pcommon.Map
AttributesByID returns the attributes for the given ID.
type AttrsParentIDDecoder ¶ added in v0.32.0
type AttrsParentIDDecoder[u constraints.Unsigned] struct { // contains filtered or unexported fields }
func NewAttrsParentIDDecoder ¶ added in v0.32.0
func NewAttrsParentIDDecoder[u constraints.Unsigned]() *AttrsParentIDDecoder[u]
type BinaryAttributeFeeder ¶
type BinaryAttributeFeeder struct {
// contains filtered or unexported fields
}
type BoolAttributeFeeder ¶
type BoolAttributeFeeder struct {
// contains filtered or unexported fields
}
type CborAttributeFeeder ¶
type CborAttributeFeeder struct {
// contains filtered or unexported fields
}
type DoubleAttributeFeeder ¶
type DoubleAttributeFeeder struct {
// contains filtered or unexported fields
}
type DynAttrsStore ¶
type DynAttrsStore struct {
// contains filtered or unexported fields
}
func CreateDynAttrsStoreFrom ¶
func CreateDynAttrsStoreFrom(record arrow.Record) (*DynAttrsStore, error)
func DynAttrsStoreFromRecord ¶
func DynAttrsStoreFromRecord(record arrow.Record) (*DynAttrsStore, error)
func (*DynAttrsStore) Attributes ¶
func (s *DynAttrsStore) Attributes(parentID uint32) (pcommon.Map, bool)
type IntAttributeFeeder ¶
type IntAttributeFeeder struct {
// contains filtered or unexported fields
}
type ParentIDGetter ¶
type ParentIDGetter struct {
// contains filtered or unexported fields
}
type ResourceIds ¶
func NewResourceIdsFromSchema ¶
func NewResourceIdsFromSchema(schema *arrow.Schema) (*ResourceIds, error)