import "go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue"
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator aggregates lastValue events.
func New(cnt int) []Aggregator
New returns a new lastValue aggregator. This aggregator retains the last value and timestamp that were recorded.
func (g *Aggregator) Aggregation() aggregation.Aggregation
Aggregation returns an interface for reading the state of this aggregator.
func (g *Aggregator) Kind() aggregation.Kind
Kind returns aggregation.LastValueKind.
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 (g *Aggregator) Merge(oa export.Aggregator, desc *metric.Descriptor) error
Merge combines state from two aggregators. The most-recently set value is chosen.
func (g *Aggregator) SynchronizedMove(oa export.Aggregator, _ *metric.Descriptor) error
SynchronizedMove atomically saves the current value.
func (g *Aggregator) Update(_ context.Context, number number.Number, desc *metric.Descriptor) error
Update atomically sets the current "last" value.
Package lastvalue imports 9 packages (graph) and is imported by 3 packages. Updated 2021-01-14. Refresh now. Tools for package owners.