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

package array

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

Index

Package Files

array.go

type Aggregator Uses

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

Aggregator aggregates events that form a distribution, keeping an array with the exact set of values.

func New Uses

func New(cnt int) []Aggregator

New returns a new array aggregator, which aggregates recorded measurements by storing them in an array. 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.ExactKind.

func (*Aggregator) Max Uses

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

Max returns the maximum value in 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() (metric.Number, error)

Min returns the mininum value in the checkpoint.

func (*Aggregator) Points Uses

func (c *Aggregator) Points() ([]metric.Number, error)

Points returns access to the raw data set.

func (*Aggregator) Quantile Uses

func (c *Aggregator) Quantile(q float64) (metric.Number, error)

Quantile returns the estimated quantile of data in the checkpoint. It is an error if `q` is less than 0 or greated than 1.

func (*Aggregator) Sum Uses

func (c *Aggregator) Sum() (metric.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 to oa and resets the current state to the empty set, taking a lock to prevent concurrent Update() calls.

func (*Aggregator) Update Uses

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

Update adds the recorded measurement to the current data set. Update takes a lock to prevent concurrent Update() and SynchronizedMove() calls.

Package array imports 9 packages (graph) and is imported by 2 packages. Updated 2020-08-09. Refresh now. Tools for package owners.