aggregator

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator[K any] struct {
	// contains filtered or unexported fields
}

Aggregator provides a single interface to update all metrics datastructures. The required datastructure is selected using the metric definition.

func NewAggregator

func NewAggregator[K any](metrics pmetric.Metrics) *Aggregator[K]

NewAggregator creates a new instance of aggregator.

func (*Aggregator[K]) Aggregate

func (a *Aggregator[K]) Aggregate(
	ctx context.Context,
	tCtx K,
	md model.MetricDef[K],
	resAttrs, srcAttrs pcommon.Map,
	defaultCount int64,
) error

func (*Aggregator[K]) Finalize

func (a *Aggregator[K]) Finalize(mds []model.MetricDef[K])

Finalize finalizes the aggregations performed by the aggregator so far into the pmetric.Metrics used to create this instance of the aggregator. Finalize should be called once per aggregator instance and the aggregator instance should not be used after Finalize is called.

Jump to

Keyboard shortcuts

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