aggregation

package
v0.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package aggregation contains configuration types that define the aggregation operation used to summarizes recorded measurements.

Deprecated: Use the aggregation types in go.opentelemetry.io/otel/sdk/metric instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregation

type Aggregation interface {

	// Copy returns a deep copy of the Aggregation.
	Copy() Aggregation

	// Err returns an error for any misconfigured Aggregation.
	Err() error
	// contains filtered or unexported methods
}

Aggregation is the aggregation used to summarize recorded measurements.

type Base2ExponentialHistogram added in v0.40.0

type Base2ExponentialHistogram struct {
	// MaxSize is the maximum number of buckets to use for the histogram.
	MaxSize int32
	// MaxScale is the maximum resolution scale to use for the histogram.
	//
	// MaxScale has a maximum value of 20. Using a value of 20 means the
	// maximum number of buckets that can fit within the range of a
	// signed 32-bit integer index could be used.
	//
	// MaxScale has a minimum value of -10. Using a value of -10 means only
	// two buckets will be use.
	MaxScale int32

	// NoMinMax indicates whether to not record the min and max of the
	// distribution. By default, these extrema are recorded.
	//
	// Recording these extrema for cumulative data is expected to have little
	// value, they will represent the entire life of the instrument instead of
	// just the current collection cycle. It is recommended to set this to true
	// for that type of data to avoid computing the low-value extrema.
	NoMinMax bool
}

Base2ExponentialHistogram is an aggregation that summarizes a set of measurements as an histogram with bucket widths that grow exponentially.

func (Base2ExponentialHistogram) Copy added in v0.40.0

Copy returns a deep copy of the Aggregation.

func (Base2ExponentialHistogram) Err added in v0.40.0

Err returns an error for any misconfigured Aggregation.

type Default

type Default struct{} // Default has no parameters.

Default is an aggregation that uses the default instrument kind selection mapping to select another aggregation. A metric reader can be configured to make an aggregation selection based on instrument kind that differs from the default. This aggregation ensures the default is used.

See the "go.opentelemetry.io/otel/sdk/metric".DefaultAggregationSelector for information about the default instrument kind selection mapping.

func (Default) Copy

func (d Default) Copy() Aggregation

Copy returns a deep copy of d.

func (Default) Err

func (Default) Err() error

Err returns an error for any misconfiguration. A Default aggregation has no parameters and cannot be misconfigured, therefore this always returns nil.

type Drop

type Drop struct{} // Drop has no parameters.

Drop is an aggregation that drops all recorded data.

func (Drop) Copy

func (d Drop) Copy() Aggregation

Copy returns a deep copy of d.

func (Drop) Err

func (Drop) Err() error

Err returns an error for any misconfiguration. A Drop aggregation has no parameters and cannot be misconfigured, therefore this always returns nil.

type ExplicitBucketHistogram

type ExplicitBucketHistogram struct {
	// Boundaries are the increasing bucket boundary values. Boundary values
	// define bucket upper bounds. Buckets are exclusive of their lower
	// boundary and inclusive of their upper bound (except at positive
	// infinity). A measurement is defined to fall into the greatest-numbered
	// bucket with a boundary that is greater than or equal to the
	// measurement. As an example, boundaries defined as:
	//
	// []float64{0, 5, 10, 25, 50, 75, 100, 250, 500, 1000}
	//
	// Will define these buckets:
	//
	// (-∞, 0], (0, 5.0], (5.0, 10.0], (10.0, 25.0], (25.0, 50.0],
	// (50.0, 75.0], (75.0, 100.0], (100.0, 250.0], (250.0, 500.0],
	// (500.0, 1000.0], (1000.0, +∞)
	Boundaries []float64
	// NoMinMax indicates whether to not record the min and max of the
	// distribution. By default, these extrema are recorded.
	//
	// Recording these extrema for cumulative data is expected to have little
	// value, they will represent the entire life of the instrument instead of
	// just the current collection cycle. It is recommended to set this to true
	// for that type of data to avoid computing the low-value extrema.
	NoMinMax bool
}

ExplicitBucketHistogram is an aggregation that summarizes a set of measurements as an histogram with explicitly defined buckets.

func (ExplicitBucketHistogram) Copy

Copy returns a deep copy of h.

func (ExplicitBucketHistogram) Err

Err returns an error for any misconfiguration.

type LastValue

type LastValue struct{} // LastValue has no parameters.

LastValue is an aggregation that summarizes a set of measurements as the last one made.

func (LastValue) Copy

func (l LastValue) Copy() Aggregation

Copy returns a deep copy of l.

func (LastValue) Err

func (LastValue) Err() error

Err returns an error for any misconfiguration. A LastValue aggregation has no parameters and cannot be misconfigured, therefore this always returns nil.

type Sum

type Sum struct{} // Sum has no parameters.

Sum is an aggregation that summarizes a set of measurements as their arithmetic sum.

func (Sum) Copy

func (s Sum) Copy() Aggregation

Copy returns a deep copy of s.

func (Sum) Err

func (Sum) Err() error

Err returns an error for any misconfiguration. A Sum aggregation has no parameters and cannot be misconfigured, therefore this always returns nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL