package ddsketch

import "go.opentelemetry.io/otel/sdk/metric/aggregator/ddsketch"

Copyright 2019, OpenTelemetry Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Functions

func NewDefaultConfig

func NewDefaultConfig() *sdk.Config

NewDefaultConfig returns a new, default DDSketch config.

Types

type Aggregator

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

Aggregator aggregates measure events.

func New

func New(cfg *sdk.Config, desc *export.Descriptor) *Aggregator

New returns a new DDSketch aggregator.

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 count of the checkpoint.

func (*Aggregator) Max

func (c *Aggregator) Max() float64

Max returns the max of the checkpoint.

func (*Aggregator) Merge

func (*Aggregator) Min

func (c *Aggregator) Min() float64

Min returns the min of the checkpoint.

func (*Aggregator) Quantile

func (c *Aggregator) Quantile(q float64) float64

Quantile returns the estimated quantile of the checkpoint.

func (*Aggregator) Sum

func (c *Aggregator) Sum() float64

Sum returns the sum of the checkpoint.

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

ddsketch.go

Version
v0.1.0
Published
Nov 4, 2019
Platform
linux/amd64
Imports
5 packages
Last checked
3 minutes ago

Tools for package owners.