Documentation ¶
Overview ¶
Package otlp contains common types and functions used to convert OTLP Arrow entities into their OTLP representation.
Index ¶
- Variables
- func Attributes16StoreFrom(record arrow.Record, store *Attributes16Store) error
- func Attributes32StoreFrom(record arrow.Record, store *Attributes32Store) error
- func AttributesId(attrs pcommon.Map, b *strings.Builder)
- 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 Attributes16Store
- type Attributes32Store
- type Attrs16ParentIdDecoder
- type Attrs32ParentIdDecoder
- 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 Attributes16StoreFrom ¶
func Attributes16StoreFrom(record arrow.Record, store *Attributes16Store) error
Attributes16StoreFrom 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 Attributes32StoreFrom ¶
func Attributes32StoreFrom(record arrow.Record, store *Attributes32Store) error
Attributes32StoreFrom creates an Attributes32Store 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 *Attributes16Store) (schemaUrl string, err error)
func UpdateScopeFromRecord ¶
func UpdateScopeFromRecord( s pcommon.InstrumentationScope, record arrow.Record, row int, ids *ScopeIds, attrsStore *Attributes16Store, ) 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 Attributes16Store ¶
type Attributes16Store struct {
// contains filtered or unexported fields
}
Attributes16Store 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 NewAttributes16Store ¶
func NewAttributes16Store() *Attributes16Store
NewAttributes16Store creates a new Attributes16Store.
func (*Attributes16Store) AttributesByDeltaID ¶
func (s *Attributes16Store) AttributesByDeltaID(ID uint16) *pcommon.Map
AttributesByDeltaID returns the attributes for the given Delta ID.
func (*Attributes16Store) AttributesByID ¶
func (s *Attributes16Store) AttributesByID(ID uint16) *pcommon.Map
AttributesByID returns the attributes for the given ID.
type Attributes32Store ¶
type Attributes32Store struct {
// contains filtered or unexported fields
}
Attributes32Store 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 NewAttributes32Store ¶
func NewAttributes32Store() *Attributes32Store
NewAttributes32Store creates a new Attributes32Store.
func (*Attributes32Store) AttributesByDeltaID ¶
func (s *Attributes32Store) AttributesByDeltaID(ID uint32) *pcommon.Map
AttributesByDeltaID returns the attributes for the given Delta ID.
func (*Attributes32Store) AttributesByID ¶
func (s *Attributes32Store) AttributesByID(ID uint32) *pcommon.Map
AttributesByID returns the attributes for the given ID.
type Attrs16ParentIdDecoder ¶
type Attrs16ParentIdDecoder struct {
// contains filtered or unexported fields
}
func NewAttrs16ParentIdDecoder ¶
func NewAttrs16ParentIdDecoder() *Attrs16ParentIdDecoder
type Attrs32ParentIdDecoder ¶
type Attrs32ParentIdDecoder struct {
// contains filtered or unexported fields
}
func NewAttrs32ParentIdDecoder ¶
func NewAttrs32ParentIdDecoder() *Attrs32ParentIdDecoder
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)