package test

import "go.opentelemetry.io/otel/exporters/metric/test"

Index

Types

type CheckpointSet

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

func NewCheckpointSet

func NewCheckpointSet() *CheckpointSet

NewCheckpointSet returns a test CheckpointSet that new records could be added. Records are grouped by their encoded labels.

func (*CheckpointSet) Add

func (p *CheckpointSet) Add(desc *metric.Descriptor, newAgg export.Aggregator, labels ...kv.KeyValue) (agg export.Aggregator, added bool)

Add a new descriptor to a Checkpoint.

If there is an existing record with the same descriptor and labels, the stored aggregator will be returned and should be merged.

func (*CheckpointSet) AddCounter

func (p *CheckpointSet) AddCounter(desc *metric.Descriptor, v float64, labels ...kv.KeyValue)

func (*CheckpointSet) AddHistogramMeasure

func (p *CheckpointSet) AddHistogramMeasure(desc *metric.Descriptor, boundaries []metric.Number, v float64, labels ...kv.KeyValue)

func (*CheckpointSet) AddLastValue

func (p *CheckpointSet) AddLastValue(desc *metric.Descriptor, v float64, labels ...kv.KeyValue)

func (*CheckpointSet) AddMeasure

func (p *CheckpointSet) AddMeasure(desc *metric.Descriptor, v float64, labels ...kv.KeyValue)

func (*CheckpointSet) ForEach

func (p *CheckpointSet) ForEach(f func(export.Record) error) error

func (*CheckpointSet) Reset

func (p *CheckpointSet) Reset()

Source Files

test.go

Version
v0.5.0
Published
May 14, 2020
Platform
darwin/amd64
Imports
11 packages
Last checked
33 minutes ago

Tools for package owners.