Documentation ¶
Overview ¶
Package otlp contains types and functions used to convert OTLP Arrow metrics into their OTLP representation.
Index ¶
- Constants
- Variables
- func AppendQuantileValuesInto(quantileSlice pmetric.SummaryDataPointValueAtQuantileSlice, ...) error
- func AppendUnivariateEHistogramDataPointBucketsInto(dpBuckets pmetric.ExponentialHistogramDataPointBuckets, ehdp *array.Struct, ...) error
- func MetricsFrom(record arrow.Record, relatedData *RelatedData) (pmetric.Metrics, error)
- type EHistogramDataPointBucketsIds
- type EHistogramDataPointIDs
- type EHistogramDataPointsStore
- type ExemplarIDs
- type ExemplarParentIdDecoder
- type ExemplarsStore
- type HistogramDataPointIDs
- type HistogramDataPointsStore
- type MetricsIds
- type NumberDataPointIDs
- type NumberDataPointsStore
- type QuantileValueIds
- type RelatedData
- type SummaryDataPointIDs
- type SummaryDataPointsStore
Constants ¶
View Source
const ( UndefinedTypeValue = 0 IntValue = 1 DoubleValue = 2 )
View Source
const None = -1
Variables ¶
Functions ¶
func AppendQuantileValuesInto ¶
func AppendQuantileValuesInto(quantileSlice pmetric.SummaryDataPointValueAtQuantileSlice, record arrow.Record, ndpIdx int, ids *QuantileValueIds) error
func AppendUnivariateEHistogramDataPointBucketsInto ¶
func AppendUnivariateEHistogramDataPointBucketsInto(dpBuckets pmetric.ExponentialHistogramDataPointBuckets, ehdp *array.Struct, ids *EHistogramDataPointBucketsIds, row int) error
func MetricsFrom ¶
MetricsFrom creates a pmetric.Metrics from the given Arrow Record.
Types ¶
type EHistogramDataPointBucketsIds ¶
func NewEHistogramDataPointBucketsIds ¶
func NewEHistogramDataPointBucketsIds(schema *arrow.Schema, parent string) (*EHistogramDataPointBucketsIds, error)
type EHistogramDataPointIDs ¶
type EHistogramDataPointIDs struct { ID int ParentID int StartTimeUnixNano int TimeUnixNano int Count int Sum int Scale int ZeroCount int Positive *EHistogramDataPointBucketsIds Negative *EHistogramDataPointBucketsIds Flags int Min int Max int }
func SchemaToEHistogramIDs ¶
func SchemaToEHistogramIDs(schema *arrow.Schema) (*EHistogramDataPointIDs, error)
type EHistogramDataPointsStore ¶
type EHistogramDataPointsStore struct {
// contains filtered or unexported fields
}
func EHistogramDataPointsStoreFrom ¶
func EHistogramDataPointsStoreFrom(record arrow.Record, exemplarsStore *ExemplarsStore, attrsStore *otlp.Attributes32Store) (*EHistogramDataPointsStore, error)
func NewEHistogramDataPointsStore ¶
func NewEHistogramDataPointsStore() *EHistogramDataPointsStore
func (*EHistogramDataPointsStore) EHistogramMetricsByID ¶
func (s *EHistogramDataPointsStore) EHistogramMetricsByID(ID uint16) pmetric.ExponentialHistogramDataPointSlice
type ExemplarIDs ¶
type ExemplarIDs struct { ID int ParentID int TimeUnixNano int SpanID int TraceID int IntValue int DoubleValue int }
ExemplarIDs contains the field IDs for the exemplar struct.
func SchemaToExemplarIDs ¶
func SchemaToExemplarIDs(schema *arrow.Schema) (*ExemplarIDs, error)
type ExemplarParentIdDecoder ¶
type ExemplarParentIdDecoder struct {
// contains filtered or unexported fields
}
func NewExemplarParentIdDecoder ¶
func NewExemplarParentIdDecoder(encodingType int) *ExemplarParentIdDecoder
type ExemplarsStore ¶
type ExemplarsStore struct {
// contains filtered or unexported fields
}
func ExemplarsStoreFrom ¶
func ExemplarsStoreFrom( record arrow.Record, attrsStore *otlp.Attributes32Store, ) (*ExemplarsStore, error)
ExemplarsStoreFrom creates an ExemplarsStore from an arrow.Record. Note: This function consume the record.
func NewExemplarsStore ¶
func NewExemplarsStore() *ExemplarsStore
func (*ExemplarsStore) ExemplarsByID ¶
func (s *ExemplarsStore) ExemplarsByID(ID uint32) pmetric.ExemplarSlice
type HistogramDataPointIDs ¶
type HistogramDataPointIDs struct { ID int ParentID int StartTimeUnixNano int TimeUnixNano int Count int Sum int BucketCounts int // List of uint64 ExplicitBounds int // List of float64 Flags int Min int Max int }
func SchemaToHistogramIDs ¶
func SchemaToHistogramIDs(schema *arrow.Schema) (*HistogramDataPointIDs, error)
type HistogramDataPointsStore ¶
type HistogramDataPointsStore struct {
// contains filtered or unexported fields
}
func HistogramDataPointsStoreFrom ¶
func HistogramDataPointsStoreFrom(record arrow.Record, exemplarsStore *ExemplarsStore, attrsStore *otlp.Attributes32Store) (*HistogramDataPointsStore, error)
func NewHistogramDataPointsStore ¶
func NewHistogramDataPointsStore() *HistogramDataPointsStore
func (*HistogramDataPointsStore) HistogramMetricsByID ¶
func (s *HistogramDataPointsStore) HistogramMetricsByID(ID uint16) pmetric.HistogramDataPointSlice
type MetricsIds ¶
type MetricsIds struct { ID int // Numerical ID of the current span Resource *otlp.ResourceIds Scope *otlp.ScopeIds SchemaUrl int MetricType int Name int Description int Unit int AggregationTemporality int IsMonotonic int }
MetricsIds contains the IDs of the fields in the Arrow Record.
func SchemaToIds ¶
func SchemaToIds(schema *arrow.Schema) (*MetricsIds, error)
type NumberDataPointIDs ¶
type NumberDataPointIDs struct { ID int ParentID int StartTimeUnixNano int TimeUnixNano int IntValue int DoubleValue int Flags int }
func SchemaToNDPIDs ¶
func SchemaToNDPIDs(schema *arrow.Schema) (*NumberDataPointIDs, error)
type NumberDataPointsStore ¶
type NumberDataPointsStore struct {
// contains filtered or unexported fields
}
func NewNumberDataPointsStore ¶
func NewNumberDataPointsStore() *NumberDataPointsStore
func NumberDataPointsStoreFrom ¶
func NumberDataPointsStoreFrom(record arrow.Record, exemplarsStore *ExemplarsStore, attrsStore *otlp.Attributes32Store) (*NumberDataPointsStore, error)
func (*NumberDataPointsStore) NumberDataPointsByID ¶
func (s *NumberDataPointsStore) NumberDataPointsByID(ID uint16) pmetric.NumberDataPointSlice
type QuantileValueIds ¶
func NewQuantileValueIds ¶
func NewQuantileValueIds(schema *arrow.Schema) (*QuantileValueIds, error)
type RelatedData ¶
type RelatedData struct { MetricID uint16 // Attributes stores ResAttrMapStore *otlp.Attributes16Store ScopeAttrMapStore *otlp.Attributes16Store NumberDPAttrsStore *otlp.Attributes32Store SummaryAttrsStore *otlp.Attributes32Store HistogramAttrsStore *otlp.Attributes32Store ExpHistogramAttrsStore *otlp.Attributes32Store NumberDPExemplarAttrsStore *otlp.Attributes32Store HistogramExemplarAttrsStore *otlp.Attributes32Store ExpHistogramExemplarAttrsStore *otlp.Attributes32Store // Metric stores NumberDataPointsStore *NumberDataPointsStore SummaryDataPointsStore *SummaryDataPointsStore HistogramDataPointsStore *HistogramDataPointsStore EHistogramDataPointsStore *EHistogramDataPointsStore // Exemplar stores NumberDataPointExemplarsStore *ExemplarsStore HistogramDataPointExemplarsStore *ExemplarsStore EHistogramDataPointExemplarsStore *ExemplarsStore }
func NewRelatedData ¶
func NewRelatedData() *RelatedData
func RelatedDataFrom ¶
func RelatedDataFrom(records []*record_message.RecordMessage) (relatedData *RelatedData, metricsRecord *record_message.RecordMessage, err error)
func (*RelatedData) MetricIDFromDelta ¶
func (r *RelatedData) MetricIDFromDelta(delta uint16) uint16
type SummaryDataPointIDs ¶
type SummaryDataPointIDs struct { ID int ParentID int StartTimeUnixNano int TimeUnixNano int Count int Sum int QuantileValues *QuantileValueIds Flags int }
func SchemaToSummaryIDs ¶
func SchemaToSummaryIDs(schema *arrow.Schema) (*SummaryDataPointIDs, error)
type SummaryDataPointsStore ¶
type SummaryDataPointsStore struct {
// contains filtered or unexported fields
}
func NewSummaryDataPointsStore ¶
func NewSummaryDataPointsStore() *SummaryDataPointsStore
func SummaryDataPointsStoreFrom ¶
func SummaryDataPointsStoreFrom(record arrow.Record, attrsStore *otlp.Attributes32Store) (*SummaryDataPointsStore, error)
func (*SummaryDataPointsStore) SummaryMetricsByID ¶
func (s *SummaryDataPointsStore) SummaryMetricsByID(ID uint16) pmetric.SummaryDataPointSlice
Click to show internal directories.
Click to hide internal directories.