otel: go.opentelemetry.io/otel/sdk/metric/aggregator/ddsketch Index | Files

package ddsketch

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

Copyright The 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

Package Files

ddsketch.go

type Aggregator Uses

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

Aggregator aggregates events into a distribution.

func New Uses

func New(cnt int, desc *metric.Descriptor, cfg *Config) []Aggregator

New returns a new DDSketch aggregator.

func (*Aggregator) Aggregation Uses

func (c *Aggregator) Aggregation() aggregation.Aggregation

Aggregation returns an interface for reading the state of this aggregator.

func (*Aggregator) Count Uses

func (c *Aggregator) Count() (int64, error)

Count returns the number of values in the checkpoint.

func (*Aggregator) Kind Uses

func (c *Aggregator) Kind() aggregation.Kind

Kind returns aggregation.SketchKind.

func (*Aggregator) Max Uses

func (c *Aggregator) Max() (metric.Number, error)

Max returns the maximum value in the checkpoint.

func (*Aggregator) Merge Uses

func (c *Aggregator) Merge(oa export.Aggregator, d *metric.Descriptor) error

Merge combines two sketches into one.

func (*Aggregator) Min Uses

func (c *Aggregator) Min() (metric.Number, error)

Min returns the minimum value in the checkpoint.

func (*Aggregator) Quantile Uses

func (c *Aggregator) Quantile(q float64) (metric.Number, error)

Quantile returns the estimated quantile of data in the checkpoint. It is an error if `q` is less than 0 or greated than 1.

func (*Aggregator) Sum Uses

func (c *Aggregator) Sum() (metric.Number, error)

Sum returns the sum of values in the checkpoint.

func (*Aggregator) SynchronizedMove Uses

func (c *Aggregator) SynchronizedMove(oa export.Aggregator, _ *metric.Descriptor) error

SynchronizedMove saves the current state into oa and resets the current state to a new sketch, taking a lock to prevent concurrent Update() calls.

func (*Aggregator) Update Uses

func (c *Aggregator) Update(_ context.Context, number metric.Number, desc *metric.Descriptor) error

Update adds the recorded measurement to the current data set. Update takes a lock to prevent concurrent Update() and SynchronizedMove() calls.

type Config Uses

type Config = sdk.Config

Config is an alias for the underlying DDSketch config object.

func NewDefaultConfig Uses

func NewDefaultConfig() *Config

NewDefaultConfig returns a new, default DDSketch config.

Package ddsketch imports 8 packages (graph) and is imported by 2 packages. Updated 2020-08-10. Refresh now. Tools for package owners.