Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct { Interval time.Duration ProcessingTime time.Time // Metadata holds an ordered list of arbitrary keys and associated // string values to associate with the interval and processing time. Metadata []KeyValues }
func (*Key) AppendBinary ¶ added in v0.4.0
AppendBinary marshals the key into its binary representation, appending it to b.
type Merger ¶
type Merger struct {
// contains filtered or unexported fields
}
func (*Merger) MergeNewer ¶
func (*Merger) MergeOlder ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value defines the data structure used to perform merges and other operations for the underlying LSM database. The basic representation of the Value is based on pmetric datastructure. To aid in merging and operations, the pmetric datastructure is expanded into multiple lookup maps as required.
Value also tracks overflows based on defined limits. Once the overflow limit is breached, the new metrics are handled as per the defined overflow behaviour. The Value can be in two states:
1) Unexpanded state, in this state the lookup maps are not created. The limit trackers, if present, are encoded into a separate field. This state is immutable i.e. the pmetric structure and the metrics cannot be modified in this state.
2) Expanded state, in this state lookup maps are created and the limit trackers are decoded and put together with their corresponding pmetric datastructure. The value is automatically upgraded to expanded state when a merge operation is performed.
Value is not safe for concurrent use.
func NewValue ¶ added in v0.4.0
func NewValue( resLimit, scopeLimit, metricLimit, datapointLimit config.LimitConfig, maxExponentialHistogramBuckets int, ) *Value
NewValue creates a new instance of the value with the configured limiters.
func (*Value) AppendBinary ¶ added in v0.5.0
AppendBinary marshals the value into its binary representation, and appends it to b.
Limit trackers and pmetric are marshaled into the same binary representation.
func (*Value) Finalize ¶ added in v0.4.0
Finalize finalizes all overflows in the metrics to prepare it for harvest. This method must be called only once for harvest.
func (*Value) MergeMetric ¶
func (v *Value) MergeMetric( otherRm pmetric.ResourceMetrics, otherSm pmetric.ScopeMetrics, otherM pmetric.Metric, ) error
MergeMetric adds a metric with a provided resource metric and scope metric. Note that overflows during addition will be applied as per the specifications for overflow handling.
func (*Value) Unmarshal ¶ added in v0.4.0
Unmarshal unmarshals the binary into the value struct. The value consists of the pmetric data structure and a set of limits tracking the overflows for each of the pmetric children (resource, scope, and datapoints). The limits are marshaled and encoded separately from the pmetric datastructure.