Documentation ¶
Overview ¶
Package arrow contains common types and functions used to convert OTLP entities into their Arrow representation.
Index ¶
- Constants
- Variables
- func Compare(a, b *pcommon.Value) int
- func Equal(a, b *pcommon.Value) bool
- func IsLess(a, b *pcommon.Value) bool
- func NewLimitErrorFromError(err error) (error, bool)
- func RequireNoError(err error)
- func WithSort() func(*Options)
- func WithStats() func(*Options)
- type AnyValueBuilder
- type AnyValueStats
- type Attr16
- type Attr32
- type AttrColumn
- type Attributes16Accumulator
- func (c *Attributes16Accumulator) Append(attrs pcommon.Map) (int64, error)
- func (c *Attributes16Accumulator) AppendWithID(parentID uint16, attrs pcommon.Map) error
- func (c *Attributes16Accumulator) IsEmpty() bool
- func (c *Attributes16Accumulator) Reset()
- func (c *Attributes16Accumulator) Sort() []string
- type Attributes32Accumulator
- type AttributesBuilder
- type AttributesStats
- type Attrs16Builder
- func (b *Attrs16Builder) Accumulator() *Attributes16Accumulator
- func (b *Attrs16Builder) Build() (arrow.Record, error)
- func (b *Attrs16Builder) IsEmpty() bool
- func (b *Attrs16Builder) PayloadType() *PayloadType
- func (b *Attrs16Builder) Release()
- func (b *Attrs16Builder) Reset()
- func (b *Attrs16Builder) Schema() *arrow.Schema
- func (b *Attrs16Builder) SchemaID() string
- func (b *Attrs16Builder) ShowSchema()
- func (b *Attrs16Builder) TryBuild() (record arrow.Record, err error)
- type Attrs16ByNothing
- type Attrs16ByParentIdKeyValue
- type Attrs16ByTypeKeyParentIdValue
- func (s *Attrs16ByTypeKeyParentIdValue) Encode(parentID uint16, key string, value *pcommon.Value) uint16
- func (s *Attrs16ByTypeKeyParentIdValue) IsSameGroup(key string, value *pcommon.Value) bool
- func (s *Attrs16ByTypeKeyParentIdValue) Reset()
- func (s *Attrs16ByTypeKeyParentIdValue) Sort(attrs []Attr16) []string
- type Attrs16ByTypeKeyValueParentId
- func (s *Attrs16ByTypeKeyValueParentId) Encode(parentID uint16, key string, value *pcommon.Value) uint16
- func (s *Attrs16ByTypeKeyValueParentId) IsSameGroup(key string, value *pcommon.Value) bool
- func (s *Attrs16ByTypeKeyValueParentId) Reset()
- func (s *Attrs16ByTypeKeyValueParentId) Sort(attrs []Attr16) []string
- type Attrs16Config
- type Attrs16Sorter
- type Attrs32Builder
- func (b *Attrs32Builder) Accumulator() *Attributes32Accumulator
- func (b *Attrs32Builder) Build() (arrow.Record, error)
- func (b *Attrs32Builder) IsEmpty() bool
- func (b *Attrs32Builder) PayloadType() *PayloadType
- func (b *Attrs32Builder) Release()
- func (b *Attrs32Builder) Reset()
- func (b *Attrs32Builder) Schema() *arrow.Schema
- func (b *Attrs32Builder) SchemaID() string
- func (b *Attrs32Builder) ShowSchema()
- func (b *Attrs32Builder) TryBuild() (record arrow.Record, err error)
- type Attrs32ByKeyValueParentId
- type Attrs32ByNothing
- type Attrs32ByTypeKeyParentIdValue
- func (s *Attrs32ByTypeKeyParentIdValue) Encode(parentID uint32, key string, value *pcommon.Value) uint32
- func (s *Attrs32ByTypeKeyParentIdValue) IsSameGroup(key string, value *pcommon.Value) bool
- func (s *Attrs32ByTypeKeyParentIdValue) Reset()
- func (s *Attrs32ByTypeKeyParentIdValue) Sort(attrs []Attr32) []string
- type Attrs32ByTypeKeyValueParentId
- func (s *Attrs32ByTypeKeyValueParentId) Encode(parentID uint32, key string, value *pcommon.Value) uint32
- func (s *Attrs32ByTypeKeyValueParentId) IsSameGroup(key string, value *pcommon.Value) bool
- func (s *Attrs32ByTypeKeyValueParentId) Reset()
- func (s *Attrs32ByTypeKeyValueParentId) Sort(attrs []Attr32) []string
- type Attrs32ByTypeParentIdKeyValue
- type Attrs32Config
- type Attrs32Sorter
- type BinaryAttrColumn
- func (c *BinaryAttrColumn) Append(v pcommon.Value)
- func (c *BinaryAttrColumn) AppendNull()
- func (c *BinaryAttrColumn) Build() error
- func (c *BinaryAttrColumn) ColMetadata() arrow.Metadata
- func (c *BinaryAttrColumn) ColName() string
- func (c *BinaryAttrColumn) ColType() arrow.DataType
- func (c *BinaryAttrColumn) Compare(i, j int) int
- func (c *BinaryAttrColumn) Len() int
- func (c *BinaryAttrColumn) Reset()
- func (c *BinaryAttrColumn) SetBuilder(builder array.Builder)
- type BoolAttrColumn
- func (c *BoolAttrColumn) Append(v pcommon.Value)
- func (c *BoolAttrColumn) AppendNull()
- func (c *BoolAttrColumn) Build() error
- func (c *BoolAttrColumn) ColMetadata() arrow.Metadata
- func (c *BoolAttrColumn) ColName() string
- func (c *BoolAttrColumn) ColType() arrow.DataType
- func (c *BoolAttrColumn) Compare(i, j int) int
- func (c *BoolAttrColumn) Len() int
- func (c *BoolAttrColumn) Reset()
- func (c *BoolAttrColumn) SetBuilder(builder array.Builder)
- type CborAttrColumn
- func (c *CborAttrColumn) Append(v pcommon.Value)
- func (c *CborAttrColumn) AppendNull()
- func (c *CborAttrColumn) Build() error
- func (c *CborAttrColumn) ColMetadata() arrow.Metadata
- func (c *CborAttrColumn) ColName() string
- func (c *CborAttrColumn) ColType() arrow.DataType
- func (c *CborAttrColumn) Compare(i, j int) int
- func (c *CborAttrColumn) Len() int
- func (c *CborAttrColumn) Reset()
- func (c *CborAttrColumn) SetBuilder(builder array.Builder)
- type DoubleAttrColumn
- func (c *DoubleAttrColumn) Append(v pcommon.Value)
- func (c *DoubleAttrColumn) AppendNull()
- func (c *DoubleAttrColumn) Build() error
- func (c *DoubleAttrColumn) ColMetadata() arrow.Metadata
- func (c *DoubleAttrColumn) ColName() string
- func (c *DoubleAttrColumn) ColType() arrow.DataType
- func (c *DoubleAttrColumn) Compare(i, j int) int
- func (c *DoubleAttrColumn) Len() int
- func (c *DoubleAttrColumn) Reset()
- func (c *DoubleAttrColumn) SetBuilder(builder array.Builder)
- type DynAttrsBuilder
- func (b *DynAttrsBuilder) Append(parentID uint32, attrs pcommon.Map) error
- func (b *DynAttrsBuilder) Build(observer observer.ProducerObserver) (arrow.Record, error)
- func (b *DynAttrsBuilder) Compare(rowI, rowJ, colIdx int) int
- func (b *DynAttrsBuilder) IsEmpty() bool
- func (b *DynAttrsBuilder) PayloadType() *PayloadType
- func (b *DynAttrsBuilder) Release()
- func (b *DynAttrsBuilder) Reset()
- func (b *DynAttrsBuilder) Schema() *arrow.Schema
- func (b *DynAttrsBuilder) SchemaID() string
- func (b *DynAttrsBuilder) SchemaUpdateCount() int
- type EntityBuilder
- type IntAttrColumn
- func (c *IntAttrColumn) Append(v pcommon.Value)
- func (c *IntAttrColumn) AppendNull()
- func (c *IntAttrColumn) Build() error
- func (c *IntAttrColumn) ColMetadata() arrow.Metadata
- func (c *IntAttrColumn) ColName() string
- func (c *IntAttrColumn) ColType() arrow.DataType
- func (c *IntAttrColumn) Compare(i, j int) int
- func (c *IntAttrColumn) Len() int
- func (c *IntAttrColumn) Reset()
- func (c *IntAttrColumn) SetBuilder(builder array.Builder)
- type LimitError
- type LimitedAllocator
- type Options
- type ParentIDColumn
- type PayloadType
- type RelatedRecordBuilder
- type RelatedRecordsManager
- func (m *RelatedRecordsManager) BuildRecordMessages() ([]*record_message.RecordMessage, error)
- func (m *RelatedRecordsManager) Declare(payloadType *PayloadType, parentPayloadType *PayloadType, schema *arrow.Schema, ...) RelatedRecordBuilder
- func (m *RelatedRecordsManager) RecordBuilderExt(payloadType *PayloadType) *builder.RecordBuilderExt
- func (m *RelatedRecordsManager) Release()
- func (m *RelatedRecordsManager) Reset()
- func (m *RelatedRecordsManager) Schemas() []SchemaWithPayload
- type ResourceBuilder
- type ResourceStats
- type SchemaUrlStats
- type SchemaWithPayload
- type ScopeBuilder
- type ScopeStats
- type StatusStats
- type StringAttrColumn
- func (c *StringAttrColumn) Append(v pcommon.Value)
- func (c *StringAttrColumn) AppendNull()
- func (c *StringAttrColumn) Build() error
- func (c *StringAttrColumn) ColMetadata() arrow.Metadata
- func (c *StringAttrColumn) ColName() string
- func (c *StringAttrColumn) ColType() arrow.DataType
- func (c *StringAttrColumn) Compare(i, j int) int
- func (c *StringAttrColumn) Len() int
- func (c *StringAttrColumn) Reset()
- func (c *StringAttrColumn) SetBuilder(builder array.Builder)
- type StringStats
- type TimeIntervalStats
- type TimestampStats
- type ValueTypeCounters
Constants ¶
const ( ColorReset = "\033[0m" Green = "\033[32m" Cyan = "\033[36m" Grey = "\033[90m" )
const ( StrCode int8 = 0 I64Code int8 = 1 F64Code int8 = 2 BoolCode int8 = 3 BinaryCode int8 = 4 CborCode int8 = 5 )
Constants used to identify the type of value in the union.
const ( // ParentIdNoEncoding stores the parent ID as is. ParentIdNoEncoding = iota // ParentIdDeltaEncoding stores the parent ID as a delta from the previous // parent ID. ParentIdDeltaEncoding // ParentIdDeltaGroupEncoding stores the parent ID as a delta from the // previous parent ID in the same group. A group is defined by the // combination Key and Value. ParentIdDeltaGroupEncoding )
ParentID encodings
const ( MetadataType = "type" BoolType = "bool" IntType = "i64" IntDictType = "i64_dict" DoubleType = "f64" StringType = "str" StringDictType = "str_dict" BytesType = "bytes" BytesDictType = "bytes_dict" CborType = "cbor" CborDictType = "cbor_dict" )
Variables ¶
var ( // KDT is the Arrow key data type. KDT = arrow.BinaryTypes.String // AttributesDT is the Arrow attribute data type. AttributesDT = arrow.MapOfWithMetadata( KDT, schema.Metadata(schema.Dictionary8), AnyValueDT, schema.Metadata(), ) )
Arrow data types used to build the attribute map.
var ( // AttrsSchema32 is the Arrow schema used to represent attribute records // with 16-bit Parent IDs. // This schema doesn't use the Arrow union type to make Parquet conversion // more direct. AttrsSchema32 = arrow.NewSchema([]arrow.Field{ {Name: constants.ParentID, Type: arrow.PrimitiveTypes.Uint32, Metadata: schema.Metadata(schema.Dictionary8)}, {Name: constants.AttributeKey, Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary8)}, {Name: constants.AttributeType, Type: arrow.PrimitiveTypes.Uint8}, {Name: constants.AttributeStr, Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary16)}, {Name: constants.AttributeInt, Type: arrow.PrimitiveTypes.Int64, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, {Name: constants.AttributeDouble, Type: arrow.PrimitiveTypes.Float64, Nullable: true}, {Name: constants.AttributeBool, Type: arrow.FixedWidthTypes.Boolean, Nullable: true}, {Name: constants.AttributeBytes, Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, {Name: constants.AttributeSer, Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, }, nil) // DeltaEncodedAttrsSchema32 is the Arrow schema used to represent attribute records // with 16-bit Parent IDs that are delta encoded. // This schema doesn't use the Arrow union type to make Parquet conversion // more direct. DeltaEncodedAttrsSchema32 = arrow.NewSchema([]arrow.Field{ {Name: constants.ParentID, Type: arrow.PrimitiveTypes.Uint32, Metadata: schema.Metadata(schema.Dictionary8, schema.DeltaEncoding)}, {Name: constants.AttributeKey, Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary8)}, {Name: constants.AttributeType, Type: arrow.PrimitiveTypes.Uint8}, {Name: constants.AttributeStr, Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary16)}, {Name: constants.AttributeInt, Type: arrow.PrimitiveTypes.Int64, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, {Name: constants.AttributeDouble, Type: arrow.PrimitiveTypes.Float64, Nullable: true}, {Name: constants.AttributeBool, Type: arrow.FixedWidthTypes.Boolean, Nullable: true}, {Name: constants.AttributeBytes, Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, {Name: constants.AttributeSer, Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, }, nil) )
var ( ErrBuilderAlreadyReleased = errors.New("builder already released") ErrInvalidResourceID = errors.New("invalid resource ID") ErrInvalidScopeID = errors.New("invalid scope ID") )
var ( // AnyValueDT is an Arrow Data Type representing an OTLP Any Value. // Any values are represented as a sparse union of the following variants: // str, i64, f64, bool, binary. // // Note: str, i64, binary, and cbor are dictionary encoded by default and // will fall back to a non-dictionary encoding when the dictionary index // overflowed. AnyValueDT = arrow.SparseUnionOf([]arrow.Field{ {Name: "str", Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary16)}, {Name: "i64", Type: arrow.PrimitiveTypes.Int64, Metadata: schema.Metadata(schema.Optional, schema.Dictionary16)}, {Name: "f64", Type: arrow.PrimitiveTypes.Float64, Metadata: schema.Metadata(schema.Optional)}, {Name: "bool", Type: arrow.FixedWidthTypes.Boolean, Metadata: schema.Metadata(schema.Optional)}, {Name: "binary", Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Optional, schema.Dictionary16)}, {Name: "cbor", Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Optional, schema.Dictionary16)}, }, []int8{ StrCode, I64Code, F64Code, BoolCode, BinaryCode, CborCode, }) )
var ( // AttrsSchema16 is the Arrow schema used to represent attribute records // with 16-bit Parent IDs. // This schema doesn't use the Arrow union type to make Parquet conversion // more direct. AttrsSchema16 = arrow.NewSchema([]arrow.Field{ {Name: constants.ParentID, Type: arrow.PrimitiveTypes.Uint16}, {Name: constants.AttributeKey, Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary8)}, {Name: constants.AttributeType, Type: arrow.PrimitiveTypes.Uint8}, {Name: constants.AttributeStr, Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary16)}, {Name: constants.AttributeInt, Type: arrow.PrimitiveTypes.Int64, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, {Name: constants.AttributeDouble, Type: arrow.PrimitiveTypes.Float64, Nullable: true}, {Name: constants.AttributeBool, Type: arrow.FixedWidthTypes.Boolean, Nullable: true}, {Name: constants.AttributeBytes, Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, {Name: constants.AttributeSer, Type: arrow.BinaryTypes.Binary, Metadata: schema.Metadata(schema.Dictionary16), Nullable: true}, }, nil) )
var ( PayloadTypes = payloadTypes{ Metrics: &PayloadType{ prefix: "metrics", payloadType: colarspb.ArrowPayloadType_UNIVARIATE_METRICS, }, Logs: &PayloadType{ prefix: "logs", payloadType: colarspb.ArrowPayloadType_LOGS, }, Spans: &PayloadType{ prefix: "spans", payloadType: colarspb.ArrowPayloadType_SPANS, }, ResourceAttrs: &PayloadType{ prefix: "resource-attrs", payloadType: colarspb.ArrowPayloadType_RESOURCE_ATTRS, }, ScopeAttrs: &PayloadType{ prefix: "scope-attrs", payloadType: colarspb.ArrowPayloadType_SCOPE_ATTRS, }, NumberDataPoints: &PayloadType{ prefix: "number-dps", payloadType: colarspb.ArrowPayloadType_NUMBER_DATA_POINTS, }, NumberDataPointAttrs: &PayloadType{ prefix: "number-dp-attrs", payloadType: colarspb.ArrowPayloadType_NUMBER_DP_ATTRS, }, NumberDataPointExemplars: &PayloadType{ prefix: "number-dp-exemplars", payloadType: colarspb.ArrowPayloadType_NUMBER_DP_EXEMPLARS, }, NumberDataPointExemplarAttrs: &PayloadType{ prefix: "number-dp-exemplar-attrs", payloadType: colarspb.ArrowPayloadType_NUMBER_DP_EXEMPLAR_ATTRS, }, Summary: &PayloadType{ prefix: "summary-dps", payloadType: colarspb.ArrowPayloadType_SUMMARY_DATA_POINTS, }, SummaryAttrs: &PayloadType{ prefix: "summary-dp-attrs", payloadType: colarspb.ArrowPayloadType_SUMMARY_DP_ATTRS, }, Histogram: &PayloadType{ prefix: "histogram-dps", payloadType: colarspb.ArrowPayloadType_HISTOGRAM_DATA_POINTS, }, HistogramAttrs: &PayloadType{ prefix: "histogram-dp-attrs", payloadType: colarspb.ArrowPayloadType_HISTOGRAM_DP_ATTRS, }, HistogramExemplars: &PayloadType{ prefix: "histogram-dp-exemplars", payloadType: colarspb.ArrowPayloadType_HISTOGRAM_DP_EXEMPLARS, }, HistogramExemplarAttrs: &PayloadType{ prefix: "histogram-dp-exemplar-attrs", payloadType: colarspb.ArrowPayloadType_HISTOGRAM_DP_EXEMPLAR_ATTRS, }, ExpHistogram: &PayloadType{ prefix: "exp-histogram-dps", payloadType: colarspb.ArrowPayloadType_EXP_HISTOGRAM_DATA_POINTS, }, ExpHistogramAttrs: &PayloadType{ prefix: "exp-histogram-dp-attrs", payloadType: colarspb.ArrowPayloadType_EXP_HISTOGRAM_DP_ATTRS, }, ExpHistogramExemplars: &PayloadType{ prefix: "exp-histogram-dp-exemplars", payloadType: colarspb.ArrowPayloadType_EXP_HISTOGRAM_DP_EXEMPLARS, }, ExpHistogramExemplarAttrs: &PayloadType{ prefix: "exp-histogram-dp-exemplar-attrs", payloadType: colarspb.ArrowPayloadType_EXP_HISTOGRAM_DP_EXEMPLAR_ATTRS, }, LogRecordAttrs: &PayloadType{ prefix: "logs-attrs", payloadType: colarspb.ArrowPayloadType_LOG_ATTRS, }, SpanAttrs: &PayloadType{ prefix: "span-attrs", payloadType: colarspb.ArrowPayloadType_SPAN_ATTRS, }, Event: &PayloadType{ prefix: "span-event", payloadType: colarspb.ArrowPayloadType_SPAN_EVENTS, }, EventAttrs: &PayloadType{ prefix: "span-event-attrs", payloadType: colarspb.ArrowPayloadType_SPAN_EVENT_ATTRS, }, Link: &PayloadType{ prefix: "span-link", payloadType: colarspb.ArrowPayloadType_SPAN_LINKS, }, LinkAttrs: &PayloadType{ prefix: "span-link-attrs", payloadType: colarspb.ArrowPayloadType_SPAN_LINK_ATTRS, }, } )
var ( ResourceDT = arrow.StructOf([]arrow.Field{ { Name: constants.ID, Type: arrow.PrimitiveTypes.Uint16, Metadata: schema.Metadata(schema.DeltaEncoding), Nullable: true, }, { Name: constants.SchemaUrl, Type: arrow.BinaryTypes.String, Metadata: schema.Metadata(schema.Dictionary8), Nullable: true, }, { Name: constants.DroppedAttributesCount, Type: arrow.PrimitiveTypes.Uint32, Nullable: true, }, }...) )
ResourceDT is the Arrow Data Type describing a resource.
var ( ScopeDT = arrow.StructOf([]arrow.Field{ {Name: constants.ID, Type: arrow.PrimitiveTypes.Uint16, Metadata: acommon.Metadata(acommon.DeltaEncoding), Nullable: true}, {Name: constants.Name, Type: arrow.BinaryTypes.String, Metadata: acommon.Metadata(acommon.Dictionary8), Nullable: true}, {Name: constants.Version, Type: arrow.BinaryTypes.String, Metadata: acommon.Metadata(acommon.Dictionary8), Nullable: true}, {Name: constants.DroppedAttributesCount, Type: arrow.PrimitiveTypes.Uint32, Nullable: true}, }...) )
ScopeDT is the Arrow Data Type describing a scope.
Functions ¶
func NewLimitErrorFromError ¶ added in v0.24.0
NewLimitErrorFromError extracts a formatted limit error.
func RequireNoError ¶
func RequireNoError(err error)
Types ¶
type AnyValueBuilder ¶
type AnyValueBuilder struct {
// contains filtered or unexported fields
}
AnyValueBuilder is a helper to build an Arrow array containing a collection of OTLP Any Value.
func AnyValueBuilderFrom ¶
func AnyValueBuilderFrom(av *builder.SparseUnionBuilder) *AnyValueBuilder
AnyValueBuilderFrom creates a new AnyValueBuilder from an existing SparseUnionBuilder.
func (*AnyValueBuilder) Append ¶
func (b *AnyValueBuilder) Append(av *pcommon.Value) error
Append appends a new any value to the builder.
func (*AnyValueBuilder) Build ¶
func (b *AnyValueBuilder) Build() (*array.SparseUnion, error)
Build builds the "any value" Arrow array.
Once the returned array is no longer needed, Release() must be called to free the memory allocated by the array.
func (*AnyValueBuilder) Release ¶
func (b *AnyValueBuilder) Release()
Release releases the memory allocated by the builder.
type AnyValueStats ¶
type AnyValueStats struct { TotalCount int64 Missing int64 // Attribute type distribution I64TypeDistribution *hdrhistogram.Histogram F64TypeDistribution *hdrhistogram.Histogram BoolTypeDistribution *hdrhistogram.Histogram StringTypeDistribution *hdrhistogram.Histogram BinaryTypeDistribution *hdrhistogram.Histogram ListTypeDistribution *hdrhistogram.Histogram MapTypeDistribution *hdrhistogram.Histogram // Attribute distinct values per type I64DistinctValue *hyperloglog.Sketch F64DistinctValue *hyperloglog.Sketch StringDistinctValue *hyperloglog.Sketch BinaryDistinctValue *hyperloglog.Sketch // Content length distribution StringLenDistribution *hdrhistogram.Histogram BinaryLenDistribution *hdrhistogram.Histogram }
func NewAnyValueStats ¶
func NewAnyValueStats() *AnyValueStats
func (*AnyValueStats) IsPresent ¶
func (a *AnyValueStats) IsPresent() bool
func (*AnyValueStats) ShowStats ¶
func (a *AnyValueStats) ShowStats(indent string, title string, color string)
func (*AnyValueStats) UpdateWith ¶
func (a *AnyValueStats) UpdateWith(value pcommon.Value)
type AttrColumn ¶
type Attributes16Accumulator ¶
type Attributes16Accumulator struct {
// contains filtered or unexported fields
}
Attributes16Accumulator accumulates attributes for the scope of an entire batch. It is used to sort globally all attributes and optimize the compression ratio. Attribute IDs are 16-bit.
func NewAttributes16Accumulator ¶
func NewAttributes16Accumulator(sorter Attrs16Sorter) *Attributes16Accumulator
func (*Attributes16Accumulator) Append ¶
func (c *Attributes16Accumulator) Append(attrs pcommon.Map) (int64, error)
func (*Attributes16Accumulator) AppendWithID ¶
func (c *Attributes16Accumulator) AppendWithID(parentID uint16, attrs pcommon.Map) error
func (*Attributes16Accumulator) IsEmpty ¶
func (c *Attributes16Accumulator) IsEmpty() bool
func (*Attributes16Accumulator) Reset ¶
func (c *Attributes16Accumulator) Reset()
func (*Attributes16Accumulator) Sort ¶
func (c *Attributes16Accumulator) Sort() []string
Sort sorts the attributes based on the provided sorter. The sorter is part of the global configuration and can be different for different payload types.
type Attributes32Accumulator ¶
type Attributes32Accumulator struct {
// contains filtered or unexported fields
}
Attributes32Accumulator accumulates attributes for the scope of an entire batch. It is used to sort globally all attributes and optimize the compression ratio. Attribute IDs are 32-bit.
func NewAttributes32Accumulator ¶
func NewAttributes32Accumulator(sorter Attrs32Sorter) *Attributes32Accumulator
func (*Attributes32Accumulator) Append ¶
func (c *Attributes32Accumulator) Append(ID uint32, attrs pcommon.Map) error
func (*Attributes32Accumulator) IsEmpty ¶
func (c *Attributes32Accumulator) IsEmpty() bool
func (*Attributes32Accumulator) Reset ¶
func (c *Attributes32Accumulator) Reset()
func (*Attributes32Accumulator) Sort ¶
func (c *Attributes32Accumulator) Sort() []string
Sort sorts the attributes based on the provided sorter. The sorter is part of the global configuration and can be different for different payload types.
type AttributesBuilder ¶
type AttributesBuilder struct {
// contains filtered or unexported fields
}
AttributesBuilder is a helper to build a map of attributes.
func AttributesBuilderFrom ¶
func AttributesBuilderFrom(mb *builder.MapBuilder) *AttributesBuilder
AttributesBuilderFrom creates a new AttributesBuilder from an existing MapBuilder.
func NewAttributesBuilder ¶
func NewAttributesBuilder(builder *builder.MapBuilder) *AttributesBuilder
NewAttributesBuilder creates a new AttributesBuilder with a given allocator.
Once the builder is no longer needed, Build() or Release() must be called to free the memory allocated by the builder.
func (*AttributesBuilder) Append ¶
func (b *AttributesBuilder) Append(attrs pcommon.Map) error
Append appends a new set of attributes to the builder. Note: empty keys are skipped.
func (*AttributesBuilder) AppendNull ¶
func (b *AttributesBuilder) AppendNull() error
func (*AttributesBuilder) Build ¶
func (b *AttributesBuilder) Build() (*array.Map, error)
Build builds the attribute array map.
Once the returned array is no longer needed, Release() must be called to free the memory allocated by the array.
func (*AttributesBuilder) Release ¶
func (b *AttributesBuilder) Release()
Release releases the memory allocated by the builder.
type AttributesStats ¶
type AttributesStats struct { TotalCount int64 Missing int64 Distribution *hdrhistogram.Histogram // Attribute type distribution I64TypeDistribution *hdrhistogram.Histogram F64TypeDistribution *hdrhistogram.Histogram BoolTypeDistribution *hdrhistogram.Histogram StringTypeDistribution *hdrhistogram.Histogram BinaryTypeDistribution *hdrhistogram.Histogram ListTypeDistribution *hdrhistogram.Histogram MapTypeDistribution *hdrhistogram.Histogram // Attribute key KeyLenDistribution *hdrhistogram.Histogram KeyDistinctValue *hyperloglog.Sketch // Attribute distinct values per type I64DistinctValue *hyperloglog.Sketch F64DistinctValue *hyperloglog.Sketch StringDistinctValue *hyperloglog.Sketch BinaryDistinctValue *hyperloglog.Sketch // Content length distribution StringLenDistribution *hdrhistogram.Histogram BinaryLenDistribution *hdrhistogram.Histogram // Dropped Attributes Count distribution DACDistinctValue *hyperloglog.Sketch }
func NewAttributesStats ¶
func NewAttributesStats() *AttributesStats
func (*AttributesStats) IsPresent ¶
func (a *AttributesStats) IsPresent() bool
func (*AttributesStats) ShowStats ¶
func (a *AttributesStats) ShowStats(indent string, title string, color string)
func (*AttributesStats) UpdateWith ¶
func (a *AttributesStats) UpdateWith(attrs pcommon.Map, dac uint32)
type Attrs16Builder ¶
type Attrs16Builder struct {
// contains filtered or unexported fields
}
func NewAttrs16BuilderWithEncoding ¶
func NewAttrs16BuilderWithEncoding(rBuilder *builder.RecordBuilderExt, payloadType *PayloadType, config *Attrs16Config) *Attrs16Builder
func (*Attrs16Builder) Accumulator ¶
func (b *Attrs16Builder) Accumulator() *Attributes16Accumulator
func (*Attrs16Builder) IsEmpty ¶
func (b *Attrs16Builder) IsEmpty() bool
func (*Attrs16Builder) PayloadType ¶
func (b *Attrs16Builder) PayloadType() *PayloadType
func (*Attrs16Builder) Release ¶
func (b *Attrs16Builder) Release()
Release releases the memory allocated by the builder.
func (*Attrs16Builder) Reset ¶
func (b *Attrs16Builder) Reset()
func (*Attrs16Builder) Schema ¶
func (b *Attrs16Builder) Schema() *arrow.Schema
func (*Attrs16Builder) SchemaID ¶
func (b *Attrs16Builder) SchemaID() string
func (*Attrs16Builder) ShowSchema ¶
func (b *Attrs16Builder) ShowSchema()
type Attrs16ByNothing ¶
type Attrs16ByNothing struct{}
func UnsortedAttrs16 ¶
func UnsortedAttrs16() *Attrs16ByNothing
func (*Attrs16ByNothing) Reset ¶
func (s *Attrs16ByNothing) Reset()
func (*Attrs16ByNothing) Sort ¶
func (s *Attrs16ByNothing) Sort(_ []Attr16) []string
type Attrs16ByParentIdKeyValue ¶
type Attrs16ByParentIdKeyValue struct {
// contains filtered or unexported fields
}
func SortByParentIdKeyValueAttr16 ¶
func SortByParentIdKeyValueAttr16() *Attrs16ByParentIdKeyValue
func (*Attrs16ByParentIdKeyValue) Reset ¶
func (s *Attrs16ByParentIdKeyValue) Reset()
func (*Attrs16ByParentIdKeyValue) Sort ¶
func (s *Attrs16ByParentIdKeyValue) Sort(attrs []Attr16) []string
type Attrs16ByTypeKeyParentIdValue ¶ added in v0.5.0
type Attrs16ByTypeKeyParentIdValue struct {
// contains filtered or unexported fields
}
func SortAttrs16ByTypeKeyParentIdValue ¶ added in v0.5.0
func SortAttrs16ByTypeKeyParentIdValue() *Attrs16ByTypeKeyParentIdValue
func (*Attrs16ByTypeKeyParentIdValue) IsSameGroup ¶ added in v0.5.0
func (s *Attrs16ByTypeKeyParentIdValue) IsSameGroup(key string, value *pcommon.Value) bool
func (*Attrs16ByTypeKeyParentIdValue) Reset ¶ added in v0.5.0
func (s *Attrs16ByTypeKeyParentIdValue) Reset()
func (*Attrs16ByTypeKeyParentIdValue) Sort ¶ added in v0.5.0
func (s *Attrs16ByTypeKeyParentIdValue) Sort(attrs []Attr16) []string
type Attrs16ByTypeKeyValueParentId ¶ added in v0.5.0
type Attrs16ByTypeKeyValueParentId struct {
// contains filtered or unexported fields
}
func SortAttrs16ByTypeKeyValueParentId ¶ added in v0.5.0
func SortAttrs16ByTypeKeyValueParentId() *Attrs16ByTypeKeyValueParentId
func (*Attrs16ByTypeKeyValueParentId) IsSameGroup ¶ added in v0.5.0
func (s *Attrs16ByTypeKeyValueParentId) IsSameGroup(key string, value *pcommon.Value) bool
func (*Attrs16ByTypeKeyValueParentId) Reset ¶ added in v0.5.0
func (s *Attrs16ByTypeKeyValueParentId) Reset()
func (*Attrs16ByTypeKeyValueParentId) Sort ¶ added in v0.5.0
func (s *Attrs16ByTypeKeyValueParentId) Sort(attrs []Attr16) []string
type Attrs16Config ¶
type Attrs16Config struct {
Sorter Attrs16Sorter
}
type Attrs16Sorter ¶
type Attrs16Sorter interface { Sort(attrs []Attr16) []string Encode(parentID uint16, key string, value *pcommon.Value) uint16 Reset() }
Attrs16Sorter is used to sort attributes with 16-bit ParentIDs.
func Attrs16FindOrderByFunc ¶ added in v0.5.0
func Attrs16FindOrderByFunc(orderBy config.OrderAttrs16By) Attrs16Sorter
Attrs16FindOrderByFunc returns the sorter for the given order by
type Attrs32Builder ¶
type Attrs32Builder struct {
// contains filtered or unexported fields
}
func NewAttrs32Builder ¶
func NewAttrs32Builder(rBuilder *builder.RecordBuilderExt, payloadType *PayloadType, sorter Attrs32Sorter) *Attrs32Builder
func NewAttrs32BuilderWithEncoding ¶
func NewAttrs32BuilderWithEncoding(rBuilder *builder.RecordBuilderExt, payloadType *PayloadType, conf *Attrs32Config) *Attrs32Builder
func (*Attrs32Builder) Accumulator ¶
func (b *Attrs32Builder) Accumulator() *Attributes32Accumulator
func (*Attrs32Builder) IsEmpty ¶
func (b *Attrs32Builder) IsEmpty() bool
func (*Attrs32Builder) PayloadType ¶
func (b *Attrs32Builder) PayloadType() *PayloadType
func (*Attrs32Builder) Release ¶
func (b *Attrs32Builder) Release()
Release releases the memory allocated by the builder.
func (*Attrs32Builder) Reset ¶
func (b *Attrs32Builder) Reset()
func (*Attrs32Builder) Schema ¶
func (b *Attrs32Builder) Schema() *arrow.Schema
func (*Attrs32Builder) SchemaID ¶
func (b *Attrs32Builder) SchemaID() string
func (*Attrs32Builder) ShowSchema ¶
func (b *Attrs32Builder) ShowSchema()
type Attrs32ByKeyValueParentId ¶
type Attrs32ByKeyValueParentId struct {
// contains filtered or unexported fields
}
func SortAttrs32ByKeyValueParentId ¶
func SortAttrs32ByKeyValueParentId() *Attrs32ByKeyValueParentId
func (*Attrs32ByKeyValueParentId) IsSameGroup ¶
func (s *Attrs32ByKeyValueParentId) IsSameGroup(key string, value *pcommon.Value) bool
func (*Attrs32ByKeyValueParentId) Reset ¶
func (s *Attrs32ByKeyValueParentId) Reset()
func (*Attrs32ByKeyValueParentId) Sort ¶
func (s *Attrs32ByKeyValueParentId) Sort(attrs []Attr32) []string
type Attrs32ByNothing ¶
type Attrs32ByNothing struct{}
func UnsortedAttrs32 ¶
func UnsortedAttrs32() *Attrs32ByNothing
func (*Attrs32ByNothing) Reset ¶
func (s *Attrs32ByNothing) Reset()
func (*Attrs32ByNothing) Sort ¶
func (s *Attrs32ByNothing) Sort(_ []Attr32) []string
type Attrs32ByTypeKeyParentIdValue ¶ added in v0.5.0
type Attrs32ByTypeKeyParentIdValue struct {
// contains filtered or unexported fields
}
func SortAttrs32ByTypeKeyParentIdValue ¶ added in v0.5.0
func SortAttrs32ByTypeKeyParentIdValue() *Attrs32ByTypeKeyParentIdValue
func (*Attrs32ByTypeKeyParentIdValue) IsSameGroup ¶ added in v0.5.0
func (s *Attrs32ByTypeKeyParentIdValue) IsSameGroup(key string, value *pcommon.Value) bool
func (*Attrs32ByTypeKeyParentIdValue) Reset ¶ added in v0.5.0
func (s *Attrs32ByTypeKeyParentIdValue) Reset()
func (*Attrs32ByTypeKeyParentIdValue) Sort ¶ added in v0.5.0
func (s *Attrs32ByTypeKeyParentIdValue) Sort(attrs []Attr32) []string
type Attrs32ByTypeKeyValueParentId ¶ added in v0.5.0
type Attrs32ByTypeKeyValueParentId struct {
// contains filtered or unexported fields
}
func SortAttrs32ByTypeKeyValueParentId ¶ added in v0.5.0
func SortAttrs32ByTypeKeyValueParentId() *Attrs32ByTypeKeyValueParentId
func (*Attrs32ByTypeKeyValueParentId) IsSameGroup ¶ added in v0.5.0
func (s *Attrs32ByTypeKeyValueParentId) IsSameGroup(key string, value *pcommon.Value) bool
func (*Attrs32ByTypeKeyValueParentId) Reset ¶ added in v0.5.0
func (s *Attrs32ByTypeKeyValueParentId) Reset()
func (*Attrs32ByTypeKeyValueParentId) Sort ¶ added in v0.5.0
func (s *Attrs32ByTypeKeyValueParentId) Sort(attrs []Attr32) []string
type Attrs32ByTypeParentIdKeyValue ¶
type Attrs32ByTypeParentIdKeyValue struct {
// contains filtered or unexported fields
}
func SortAttrs32ByTypeParentIdKeyValue ¶
func SortAttrs32ByTypeParentIdKeyValue() *Attrs32ByTypeParentIdKeyValue
func (*Attrs32ByTypeParentIdKeyValue) Reset ¶
func (s *Attrs32ByTypeParentIdKeyValue) Reset()
func (*Attrs32ByTypeParentIdKeyValue) Sort ¶
func (s *Attrs32ByTypeParentIdKeyValue) Sort(attrs []Attr32) []string
type Attrs32Config ¶
type Attrs32Config struct {
Sorter Attrs32Sorter
}
type Attrs32Sorter ¶
type Attrs32Sorter interface { Sort(attrs []Attr32) []string Encode(parentID uint32, key string, value *pcommon.Value) uint32 Reset() }
Attrs32Sorter is used to sort attributes with 32-bit ParentIDs.
func Attrs32FindOrderByFunc ¶ added in v0.5.0
func Attrs32FindOrderByFunc(orderBy config.OrderAttrs32By) Attrs32Sorter
Attrs32FindOrderByFunc returns the sorter for the given order by
type BinaryAttrColumn ¶
type BinaryAttrColumn struct {
// contains filtered or unexported fields
}
func (*BinaryAttrColumn) Append ¶
func (c *BinaryAttrColumn) Append(v pcommon.Value)
func (*BinaryAttrColumn) AppendNull ¶
func (c *BinaryAttrColumn) AppendNull()
func (*BinaryAttrColumn) Build ¶
func (c *BinaryAttrColumn) Build() error
func (*BinaryAttrColumn) ColMetadata ¶
func (c *BinaryAttrColumn) ColMetadata() arrow.Metadata
func (*BinaryAttrColumn) ColName ¶
func (c *BinaryAttrColumn) ColName() string
func (*BinaryAttrColumn) ColType ¶
func (c *BinaryAttrColumn) ColType() arrow.DataType
func (*BinaryAttrColumn) Compare ¶
func (c *BinaryAttrColumn) Compare(i, j int) int
func (*BinaryAttrColumn) Len ¶
func (c *BinaryAttrColumn) Len() int
func (*BinaryAttrColumn) Reset ¶
func (c *BinaryAttrColumn) Reset()
func (*BinaryAttrColumn) SetBuilder ¶
func (c *BinaryAttrColumn) SetBuilder(builder array.Builder)
type BoolAttrColumn ¶
type BoolAttrColumn struct {
// contains filtered or unexported fields
}
func (*BoolAttrColumn) Append ¶
func (c *BoolAttrColumn) Append(v pcommon.Value)
func (*BoolAttrColumn) AppendNull ¶
func (c *BoolAttrColumn) AppendNull()
func (*BoolAttrColumn) Build ¶
func (c *BoolAttrColumn) Build() error
func (*BoolAttrColumn) ColMetadata ¶
func (c *BoolAttrColumn) ColMetadata() arrow.Metadata
func (*BoolAttrColumn) ColName ¶
func (c *BoolAttrColumn) ColName() string
func (*BoolAttrColumn) ColType ¶
func (c *BoolAttrColumn) ColType() arrow.DataType
func (*BoolAttrColumn) Compare ¶
func (c *BoolAttrColumn) Compare(i, j int) int
func (*BoolAttrColumn) Len ¶
func (c *BoolAttrColumn) Len() int
func (*BoolAttrColumn) Reset ¶
func (c *BoolAttrColumn) Reset()
func (*BoolAttrColumn) SetBuilder ¶
func (c *BoolAttrColumn) SetBuilder(builder array.Builder)
type CborAttrColumn ¶
type CborAttrColumn struct {
// contains filtered or unexported fields
}
func (*CborAttrColumn) Append ¶
func (c *CborAttrColumn) Append(v pcommon.Value)
func (*CborAttrColumn) AppendNull ¶
func (c *CborAttrColumn) AppendNull()
func (*CborAttrColumn) Build ¶
func (c *CborAttrColumn) Build() error
func (*CborAttrColumn) ColMetadata ¶
func (c *CborAttrColumn) ColMetadata() arrow.Metadata
func (*CborAttrColumn) ColName ¶
func (c *CborAttrColumn) ColName() string
func (*CborAttrColumn) ColType ¶
func (c *CborAttrColumn) ColType() arrow.DataType
func (*CborAttrColumn) Compare ¶
func (c *CborAttrColumn) Compare(i, j int) int
func (*CborAttrColumn) Len ¶
func (c *CborAttrColumn) Len() int
func (*CborAttrColumn) Reset ¶
func (c *CborAttrColumn) Reset()
func (*CborAttrColumn) SetBuilder ¶
func (c *CborAttrColumn) SetBuilder(builder array.Builder)
type DoubleAttrColumn ¶
type DoubleAttrColumn struct {
// contains filtered or unexported fields
}
func (*DoubleAttrColumn) Append ¶
func (c *DoubleAttrColumn) Append(v pcommon.Value)
func (*DoubleAttrColumn) AppendNull ¶
func (c *DoubleAttrColumn) AppendNull()
func (*DoubleAttrColumn) Build ¶
func (c *DoubleAttrColumn) Build() error
func (*DoubleAttrColumn) ColMetadata ¶
func (c *DoubleAttrColumn) ColMetadata() arrow.Metadata
func (*DoubleAttrColumn) ColName ¶
func (c *DoubleAttrColumn) ColName() string
func (*DoubleAttrColumn) ColType ¶
func (c *DoubleAttrColumn) ColType() arrow.DataType
func (*DoubleAttrColumn) Compare ¶
func (c *DoubleAttrColumn) Compare(i, j int) int
func (*DoubleAttrColumn) Len ¶
func (c *DoubleAttrColumn) Len() int
func (*DoubleAttrColumn) Reset ¶
func (c *DoubleAttrColumn) Reset()
func (*DoubleAttrColumn) SetBuilder ¶
func (c *DoubleAttrColumn) SetBuilder(builder array.Builder)
type DynAttrsBuilder ¶
type DynAttrsBuilder struct {
// contains filtered or unexported fields
}
func NewDynAttrsBuilder ¶
func NewDynAttrsBuilder(payloadType *PayloadType, mem memory.Allocator) *DynAttrsBuilder
func (*DynAttrsBuilder) Append ¶
func (b *DynAttrsBuilder) Append(parentID uint32, attrs pcommon.Map) error
func (*DynAttrsBuilder) Build ¶
func (b *DynAttrsBuilder) Build(observer observer.ProducerObserver) (arrow.Record, error)
func (*DynAttrsBuilder) Compare ¶
func (b *DynAttrsBuilder) Compare(rowI, rowJ, colIdx int) int
func (*DynAttrsBuilder) IsEmpty ¶
func (b *DynAttrsBuilder) IsEmpty() bool
func (*DynAttrsBuilder) PayloadType ¶
func (b *DynAttrsBuilder) PayloadType() *PayloadType
func (*DynAttrsBuilder) Release ¶
func (b *DynAttrsBuilder) Release()
Release releases the memory allocated by the builder.
func (*DynAttrsBuilder) Reset ¶
func (b *DynAttrsBuilder) Reset()
func (*DynAttrsBuilder) Schema ¶
func (b *DynAttrsBuilder) Schema() *arrow.Schema
func (*DynAttrsBuilder) SchemaID ¶
func (b *DynAttrsBuilder) SchemaID() string
func (*DynAttrsBuilder) SchemaUpdateCount ¶
func (b *DynAttrsBuilder) SchemaUpdateCount() int
type EntityBuilder ¶
type IntAttrColumn ¶
type IntAttrColumn struct {
// contains filtered or unexported fields
}
func (*IntAttrColumn) Append ¶
func (c *IntAttrColumn) Append(v pcommon.Value)
func (*IntAttrColumn) AppendNull ¶
func (c *IntAttrColumn) AppendNull()
func (*IntAttrColumn) Build ¶
func (c *IntAttrColumn) Build() error
func (*IntAttrColumn) ColMetadata ¶
func (c *IntAttrColumn) ColMetadata() arrow.Metadata
func (*IntAttrColumn) ColName ¶
func (c *IntAttrColumn) ColName() string
func (*IntAttrColumn) ColType ¶
func (c *IntAttrColumn) ColType() arrow.DataType
func (*IntAttrColumn) Compare ¶
func (c *IntAttrColumn) Compare(i, j int) int
func (*IntAttrColumn) Len ¶
func (c *IntAttrColumn) Len() int
func (*IntAttrColumn) Reset ¶
func (c *IntAttrColumn) Reset()
func (*IntAttrColumn) SetBuilder ¶
func (c *IntAttrColumn) SetBuilder(builder array.Builder)
type LimitError ¶
func (LimitError) Error ¶
func (le LimitError) Error() string
func (LimitError) Is ¶
func (_ LimitError) Is(tgt error) bool
type LimitedAllocator ¶
type LimitedAllocator struct { Allocator memory.Allocator // contains filtered or unexported fields }
func NewLimitedAllocator ¶
func NewLimitedAllocator(allocator memory.Allocator, limit uint64) *LimitedAllocator
func (*LimitedAllocator) Allocate ¶
func (l *LimitedAllocator) Allocate(size int) []byte
func (*LimitedAllocator) Free ¶
func (l *LimitedAllocator) Free(b []byte)
func (*LimitedAllocator) Inuse ¶ added in v0.5.0
func (l *LimitedAllocator) Inuse() uint64
func (*LimitedAllocator) Reallocate ¶
func (l *LimitedAllocator) Reallocate(size int, b []byte) []byte
type ParentIDColumn ¶
type ParentIDColumn struct {
// contains filtered or unexported fields
}
func (*ParentIDColumn) Build ¶
func (c *ParentIDColumn) Build()
func (*ParentIDColumn) Reset ¶
func (c *ParentIDColumn) Reset()
type PayloadType ¶
type PayloadType struct {
// contains filtered or unexported fields
}
PayloadType wraps the protobuf payload type generated from the protobuf definition and adds a prefix to it.
func (*PayloadType) PayloadType ¶
func (p *PayloadType) PayloadType() record_message.PayloadType
func (*PayloadType) SchemaPrefix ¶
func (p *PayloadType) SchemaPrefix() string
type RelatedRecordBuilder ¶
type RelatedRecordBuilder interface { IsEmpty() bool Build() (arrow.Record, error) SchemaID() string Schema() *arrow.Schema PayloadType() *PayloadType Reset() Release() }
RelatedRecordBuilder is the common interface for all related record builders.
type RelatedRecordsManager ¶
type RelatedRecordsManager struct {
// contains filtered or unexported fields
}
RelatedRecordsManager manages all related record builders for a given main OTel entity.
func NewRelatedRecordsManager ¶
func NewRelatedRecordsManager(cfg *cfg.Config, stats *stats.ProducerStats) *RelatedRecordsManager
func (*RelatedRecordsManager) BuildRecordMessages ¶
func (m *RelatedRecordsManager) BuildRecordMessages() ([]*record_message.RecordMessage, error)
func (*RelatedRecordsManager) Declare ¶
func (m *RelatedRecordsManager) Declare( payloadType *PayloadType, parentPayloadType *PayloadType, schema *arrow.Schema, rrBuilder func(b *builder.RecordBuilderExt) RelatedRecordBuilder, observer observer.ProducerObserver, ) RelatedRecordBuilder
func (*RelatedRecordsManager) RecordBuilderExt ¶
func (m *RelatedRecordsManager) RecordBuilderExt(payloadType *PayloadType) *builder.RecordBuilderExt
func (*RelatedRecordsManager) Release ¶
func (m *RelatedRecordsManager) Release()
func (*RelatedRecordsManager) Reset ¶
func (m *RelatedRecordsManager) Reset()
func (*RelatedRecordsManager) Schemas ¶
func (m *RelatedRecordsManager) Schemas() []SchemaWithPayload
type ResourceBuilder ¶
type ResourceBuilder struct {
// contains filtered or unexported fields
}
ResourceBuilder is an Arrow builder for resources.
func ResourceBuilderFrom ¶
func ResourceBuilderFrom(builder *builder.StructBuilder) *ResourceBuilder
ResourceBuilderFrom creates a new resource builder from an existing struct builder.
func (*ResourceBuilder) Build ¶
func (b *ResourceBuilder) Build() (*array.Struct, error)
Build builds the resource array struct.
Once the array is no longer needed, Release() must be called to free the memory allocated by the array.
func (*ResourceBuilder) Release ¶
func (b *ResourceBuilder) Release()
Release releases the memory allocated by the builder.
type ResourceStats ¶
type ResourceStats struct { TotalCount int64 Missing int64 AttributesStats *AttributesStats }
func (*ResourceStats) ShowStats ¶
func (r *ResourceStats) ShowStats(indent string)
func (*ResourceStats) UpdateWith ¶
func (r *ResourceStats) UpdateWith(res pcommon.Resource)
type SchemaUrlStats ¶
type SchemaUrlStats struct { Missing int64 NonEmpty int64 SizeDistribution *hdrhistogram.Histogram }
func (*SchemaUrlStats) ShowStats ¶
func (s *SchemaUrlStats) ShowStats(indent string)
func (*SchemaUrlStats) UpdateWith ¶
func (s *SchemaUrlStats) UpdateWith(schemaUrl string)
type SchemaWithPayload ¶
type SchemaWithPayload struct { Schema *arrow.Schema PayloadType *PayloadType ParentPayloadType *PayloadType }
type ScopeBuilder ¶
type ScopeBuilder struct {
// contains filtered or unexported fields
}
func ScopeBuilderFrom ¶
func ScopeBuilderFrom(sb *builder.StructBuilder) *ScopeBuilder
ScopeBuilderFrom creates a new instrumentation scope array builder from an existing struct builder.
func (*ScopeBuilder) Append ¶
func (b *ScopeBuilder) Append(scopeID int64, scope pcommon.InstrumentationScope) error
func (*ScopeBuilder) Build ¶
func (b *ScopeBuilder) Build() (*array.Struct, error)
Build builds the instrumentation scope array struct.
Once the array is no longer needed, Release() must be called to free the memory allocated by the array.
func (*ScopeBuilder) Release ¶
func (b *ScopeBuilder) Release()
Release releases the memory allocated by the builder.
type ScopeStats ¶
type ScopeStats struct { TotalCount int64 Missing int64 AttributesStats *AttributesStats Name *StringStats Version *StringStats }
func (*ScopeStats) ShowStats ¶
func (s *ScopeStats) ShowStats(indent string)
func (*ScopeStats) UpdateWith ¶
func (s *ScopeStats) UpdateWith(scope pcommon.InstrumentationScope)
type StatusStats ¶
type StatusStats struct { TotalCount int64 Missing int64 CodeDistinctValue *hyperloglog.Sketch MissingCode int64 MessageDistincValue *hyperloglog.Sketch MessageLenDistribution *hdrhistogram.Histogram MissingMessage int64 }
func NewStatusStats ¶
func NewStatusStats() *StatusStats
func (*StatusStats) ShowStats ¶
func (s *StatusStats) ShowStats(indent string)
func (*StatusStats) UpdateWith ¶
func (s *StatusStats) UpdateWith(status ptrace.Status)
type StringAttrColumn ¶
type StringAttrColumn struct {
// contains filtered or unexported fields
}
func (*StringAttrColumn) Append ¶
func (c *StringAttrColumn) Append(v pcommon.Value)
func (*StringAttrColumn) AppendNull ¶
func (c *StringAttrColumn) AppendNull()
func (*StringAttrColumn) Build ¶
func (c *StringAttrColumn) Build() error
func (*StringAttrColumn) ColMetadata ¶
func (c *StringAttrColumn) ColMetadata() arrow.Metadata
func (*StringAttrColumn) ColName ¶
func (c *StringAttrColumn) ColName() string
func (*StringAttrColumn) ColType ¶
func (c *StringAttrColumn) ColType() arrow.DataType
func (*StringAttrColumn) Compare ¶
func (c *StringAttrColumn) Compare(i, j int) int
func (*StringAttrColumn) Len ¶
func (c *StringAttrColumn) Len() int
func (*StringAttrColumn) Reset ¶
func (c *StringAttrColumn) Reset()
func (*StringAttrColumn) SetBuilder ¶
func (c *StringAttrColumn) SetBuilder(builder array.Builder)
type StringStats ¶
type StringStats struct { Missing int64 LenDistribution *hdrhistogram.Histogram DistinctValue *hyperloglog.Sketch }
func NewStringStats ¶
func NewStringStats() *StringStats
func (*StringStats) IsPresent ¶
func (s *StringStats) IsPresent() bool
func (*StringStats) ShowStats ¶
func (s *StringStats) ShowStats(name string, indent string)
func (*StringStats) UpdateWith ¶
func (s *StringStats) UpdateWith(str string)
type TimeIntervalStats ¶
type TimeIntervalStats struct { TotalCount int64 StartTimeDistinctValue *hyperloglog.Sketch EndTimeDistinctValue *hyperloglog.Sketch IntervalDistinctValue *hyperloglog.Sketch StartDeltaDistinctValue *hyperloglog.Sketch EndDeltaDistinctValue *hyperloglog.Sketch }
func NewTimeIntervalStats ¶
func NewTimeIntervalStats() *TimeIntervalStats
func (*TimeIntervalStats) ShowStats ¶
func (t *TimeIntervalStats) ShowStats(indent string)
func (*TimeIntervalStats) UpdateWithSpans ¶
func (t *TimeIntervalStats) UpdateWithSpans(spans []ptrace.Span)
type TimestampStats ¶
type TimestampStats struct { TotalCount int64 TimeDistinctValue *hyperloglog.Sketch }
func NewTimestampStats ¶
func NewTimestampStats() *TimestampStats
func (*TimestampStats) ShowStats ¶
func (t *TimestampStats) ShowStats(title, indent string)
func (*TimestampStats) UpdateWith ¶
func (t *TimestampStats) UpdateWith(timestamp pcommon.Timestamp)
type ValueTypeCounters ¶
type ValueTypeCounters struct {
// contains filtered or unexported fields
}
ValueTypeCounters is a struct to count the number of values of each type.