otel: go.opentelemetry.io/otel/sdk/metric/aggregator/minmaxsumcount Index | Files

package minmaxsumcount

import "go.opentelemetry.io/otel/sdk/metric/aggregator/minmaxsumcount"

Index

Package Files

mmsc.go

type Aggregator Uses

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

Aggregator aggregates events that form a distribution, keeping only the min, max, sum, and count.

func New Uses

func New(cnt int, desc *metric.Descriptor) []Aggregator

New returns a new aggregator for computing the min, max, sum, and count. It does not compute quantile information other than Min and Max.

This type uses a mutex for Update() and SynchronizedMove() concurrency.

func (*Aggregator) Aggregation Uses

func (c *Aggregator) Aggregation() aggregation.Aggregation

Aggregation returns an interface for reading the state of this aggregator.

func (*Aggregator) Count Uses

func (c *Aggregator) Count() (int64, error)

Count returns the number of values in the checkpoint.

func (*Aggregator) Kind Uses

func (c *Aggregator) Kind() aggregation.Kind

Kind returns aggregation.MinMaxSumCountKind.

func (*Aggregator) Max Uses

func (c *Aggregator) Max() (number.Number, error)

Max returns the maximum value in the checkpoint. The error value aggregation.ErrNoData will be returned if there were no measurements recorded during the checkpoint.

func (*Aggregator) Merge Uses

func (c *Aggregator) Merge(oa export.Aggregator, desc *metric.Descriptor) error

Merge combines two data sets into one.

func (*Aggregator) Min Uses

func (c *Aggregator) Min() (number.Number, error)

Min returns the minimum value in the checkpoint. The error value aggregation.ErrNoData will be returned if there were no measurements recorded during the checkpoint.

func (*Aggregator) Sum Uses

func (c *Aggregator) Sum() (number.Number, error)

Sum returns the sum of values in the checkpoint.

func (*Aggregator) SynchronizedMove Uses

func (c *Aggregator) SynchronizedMove(oa export.Aggregator, desc *metric.Descriptor) error

SynchronizedMove saves the current state into oa and resets the current state to the empty set.

func (*Aggregator) Update Uses

func (c *Aggregator) Update(_ context.Context, number number.Number, desc *metric.Descriptor) error

Update adds the recorded measurement to the current data set.

Package minmaxsumcount imports 7 packages (graph) and is imported by 3 packages. Updated 2020-11-18. Refresh now. Tools for package owners.