package test

import "go.opentelemetry.io/otel/sdk/metric/processor/test"

Index

Functions

func AggregatorSelector

func AggregatorSelector() export.AggregatorSelector

AggregatorSelector returns a policy that is consistent with the test descriptors above. I.e., it returns sum.New() for counter instruments and lastvalue.New() for lastValue instruments.

Types

type Output

type Output struct {
	Map map[string]float64
	// contains filtered or unexported fields
}

Output collects distinct metric/label set outputs.

func NewOutput

func NewOutput(labelEncoder label.Encoder) Output

func (Output) AddAccumulation

func (o Output) AddAccumulation(acc export.Accumulation) error

AddAccumulation adds a string representation of the exported metric data to a map for use in testing. The value taken from the accumulation is either the Sum() or the LastValue() of its Aggregator().Aggregation(), whichever is defined.

func (Output) AddRecord

func (o Output) AddRecord(rec export.Record) error

AddRecord adds a string representation of the exported metric data to a map for use in testing. The value taken from the record is either the Sum() or the LastValue() of its Aggregation(), whichever is defined. Record timestamps are ignored.

Source Files

test.go

Version
v0.7.0
Published
Jun 26, 2020
Platform
linux/amd64
Imports
13 packages
Last checked
1 minute ago

Tools for package owners.