package maxsumcount
import "go.opentelemetry.io/otel/sdk/metric/aggregator/maxsumcount"
Index ¶
- type Aggregator
- func New() *Aggregator
- func (c *Aggregator) Collect(ctx context.Context, rec export.MetricRecord, exp export.MetricBatcher)
- func (c *Aggregator) Count() int64
- func (c *Aggregator) Max() core.Number
- func (c *Aggregator) Merge(oa export.MetricAggregator, desc *export.Descriptor)
- func (c *Aggregator) Sum() core.Number
- func (c *Aggregator) Update(_ context.Context, number core.Number, rec export.MetricRecord)
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator aggregates measure events, keeping only the max, sum, and count.
func New ¶
func New() *Aggregator
New returns a new measure aggregator for computing max, sum, and count.
func (*Aggregator) Collect ¶
func (c *Aggregator) Collect(ctx context.Context, rec export.MetricRecord, exp export.MetricBatcher)
Collect checkpoints the current value (atomically) and exports it.
func (*Aggregator) Count ¶
func (c *Aggregator) Count() int64
Count returns the accumulated count.
func (*Aggregator) Max ¶
func (c *Aggregator) Max() core.Number
Max returns the accumulated max as a Number.
func (*Aggregator) Merge ¶
func (c *Aggregator) Merge(oa export.MetricAggregator, desc *export.Descriptor)
func (*Aggregator) Sum ¶
func (c *Aggregator) Sum() core.Number
Sum returns the accumulated sum as a Number.
func (*Aggregator) Update ¶
func (c *Aggregator) Update(_ context.Context, number core.Number, rec export.MetricRecord)
Update modifies the current value (atomically) for later export.
Source Files ¶
msc.go
- Version
- v0.1.0
- Published
- Nov 4, 2019
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 12 minutes ago –
Tools for package owners.