aggregateutil

package
v0.116.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AggregationTypes = []AggregationType{Sum, Mean, Min, Max, Median, Count}

Functions

func CopyMetricDetails

func CopyMetricDetails(from, to pmetric.Metric)

func FilterAttrs

func FilterAttrs(metric pmetric.Metric, filterAttrKeys []string)

func GetSupportedAggregationFunctionsList added in v0.106.0

func GetSupportedAggregationFunctionsList() string

func GroupDataPoints

func GroupDataPoints(metric pmetric.Metric, ag *AggGroups)

func MergeDataPoints

func MergeDataPoints(to pmetric.Metric, aggType AggregationType, ag AggGroups)

func RangeDataPointAttributes

func RangeDataPointAttributes(metric pmetric.Metric, f func(pcommon.Map) bool)

RangeDataPointAttributes calls f sequentially on attributes of every metric data point. The iteration terminates if f returns false.

Types

type AggGroups

type AggGroups struct {
	// contains filtered or unexported fields
}

type AggregationType

type AggregationType string

AggregationType is the enum to capture the three types of aggregation for the aggregation operation.

const (
	// Sum indicates taking the sum of the aggregated data.
	Sum AggregationType = "sum"

	// Mean indicates taking the mean of the aggregated data.
	Mean AggregationType = "mean"

	// Min indicates taking the minimum of the aggregated data.
	Min AggregationType = "min"

	// Max indicates taking the max of the aggregated data.
	Max AggregationType = "max"

	// Median indicates taking the median of the aggregated data.
	Median AggregationType = "median"

	// Count indicates taking the count of the aggregated data.
	Count AggregationType = "count"
)

func ConvertToAggregationFunction added in v0.106.0

func ConvertToAggregationFunction(str string) (AggregationType, error)

func (AggregationType) IsValid

func (at AggregationType) IsValid() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL