package basic
import "go.opentelemetry.io/otel/sdk/metric/processor/basic"
Index ¶
- Variables
- func NewFactory(aselector export.AggregatorSelector, tselector aggregation.TemporalitySelector, opts ...Option) export.CheckpointerFactory
- type Option
- type Processor
- func New(aselector export.AggregatorSelector, tselector aggregation.TemporalitySelector, opts ...Option) *Processor
- func (b *Processor) FinishCollection() error
- func (b *Processor) ForEach(exporter aggregation.TemporalitySelector, f func(export.Record) error) error
- func (b *Processor) Process(accum export.Accumulation) error
- func (b *Processor) Reader() export.Reader
- func (b *Processor) StartCollection()
Variables ¶
ErrInconsistentState is returned when the sequence of collection's starts and finishes are incorrectly balanced.
ErrInvalidTemporality is returned for unknown metric.Temporality.
Functions ¶
func NewFactory ¶
func NewFactory(aselector export.AggregatorSelector, tselector aggregation.TemporalitySelector, opts ...Option) export.CheckpointerFactory
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithMemory ¶
WithMemory sets the memory behavior of a Processor. If this is true, the processor will report metric instruments and label sets that were previously reported but not updated in the most recent interval.
type Processor ¶
type Processor struct { aggregation.TemporalitySelector export.AggregatorSelector // contains filtered or unexported fields }
func New ¶
func New(aselector export.AggregatorSelector, tselector aggregation.TemporalitySelector, opts ...Option) *Processor
New returns a basic Processor that is also a Checkpointer using the provided AggregatorSelector to select Aggregators. The TemporalitySelector is consulted to determine the kind(s) of exporter that will consume data, so that this Processor can prepare to compute Cumulative Aggregations as needed.
func (*Processor) FinishCollection ¶
FinishCollection signals to the Processor that a complete collection has finished and that ForEach will be called to access the Reader.
func (*Processor) ForEach ¶
func (b *Processor) ForEach(exporter aggregation.TemporalitySelector, f func(export.Record) error) error
ForEach iterates through the Reader, passing an export.Record with the appropriate Cumulative or Delta aggregation to an exporter.
func (*Processor) Process ¶
func (b *Processor) Process(accum export.Accumulation) error
Process implements export.Processor.
func (*Processor) Reader ¶
Reader returns the associated Reader. Use the Reader Locker interface to synchronize access to this object. The Reader.ForEach() method cannot be called concurrently with Process().
func (*Processor) StartCollection ¶
func (b *Processor) StartCollection()
StartCollection signals to the Processor one or more Accumulators will begin calling Process() calls during collection.
Source Files ¶
basic.go config.go
- Version
- v0.26.0
- Published
- Dec 10, 2021
- Platform
- js/wasm
- Imports
- 8 packages
- Last checked
- 2 hours ago –
Tools for package owners.