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

package lastvalue

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

Index

Package Files

lastvalue.go

type Aggregator Uses

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

Aggregator aggregates lastValue events.

func New Uses

func New(cnt int) []Aggregator

New returns a new lastValue aggregator. This aggregator retains the last value and timestamp that were recorded.

func (*Aggregator) Aggregation Uses

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

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

func (*Aggregator) Kind Uses

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

Kind returns aggregation.LastValueKind.

func (*Aggregator) LastValue Uses

func (g *Aggregator) LastValue() (otel.Number, time.Time, error)

LastValue returns the last-recorded lastValue value and the corresponding timestamp. The error value aggregation.ErrNoData will be returned if (due to a race condition) the checkpoint was computed before the first value was set.

func (*Aggregator) Merge Uses

func (g *Aggregator) Merge(oa export.Aggregator, desc *otel.Descriptor) error

Merge combines state from two aggregators. The most-recently set value is chosen.

func (*Aggregator) SynchronizedMove Uses

func (g *Aggregator) SynchronizedMove(oa export.Aggregator, _ *otel.Descriptor) error

SynchronizedMove atomically saves the current value.

func (*Aggregator) Update Uses

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

Update atomically sets the current "last" value.

Package lastvalue imports 8 packages (graph) and is imported by 3 packages. Updated 2020-10-18. Refresh now. Tools for package owners.