package aggregator
import "go.opentelemetry.io/otel/sdk/export/metric/aggregator"
Index ¶
- Variables
- func NewInconsistentMergeError(a1, a2 export.Aggregator) error
- func RangeTest(number metric.Number, descriptor *metric.Descriptor) error
- type Buckets
- type Count
- type Distribution
- type Histogram
- type LastValue
- type Max
- type Min
- type MinMaxSumCount
- type Points
- type Quantile
- type Sum
Variables ¶
var ( ErrInvalidQuantile = fmt.Errorf("the requested quantile is out of range") ErrNegativeInput = fmt.Errorf("negative value is out of range for this instrument") ErrNaNInput = fmt.Errorf("NaN value is an invalid input") ErrInconsistentType = fmt.Errorf("inconsistent aggregator types") // ErrNoData is returned when (due to a race with collection) // the Aggregator is check-pointed before the first value is set. // The aggregator should simply be skipped in this case. ErrNoData = fmt.Errorf("no data collected by this aggregator") )
Functions ¶
func NewInconsistentMergeError ¶
func NewInconsistentMergeError(a1, a2 export.Aggregator) error
NewInconsistentMergeError formats an error describing an attempt to merge different-type aggregators. The result can be unwrapped as an ErrInconsistentType.
func RangeTest ¶
func RangeTest(number metric.Number, descriptor *metric.Descriptor) error
RangeTest is a commmon routine for testing for valid input values. This rejects NaN values. This rejects negative values when the metric instrument does not support negative values, including monotonic counter metrics and absolute ValueRecorder metrics.
Types ¶
type Buckets ¶
type Buckets struct { // Boundaries are floating point numbers, even when // aggregating integers. Boundaries []float64 // Counts are floating point numbers to account for // the possibility of sampling which allows for // non-integer count values. Counts []float64 }
Buckets represents histogram buckets boundaries and counts.
For a Histogram with N defined boundaries, e.g, [x, y, z]. There are N+1 counts: [-inf, x), [x, y), [y, z), [z, +inf]
type Count ¶
Sum returns the number of values that were aggregated.
type Distribution ¶
type Distribution interface { MinMaxSumCount Quantile }
Distribution supports the Min, Max, Sum, Count, and Quantile interfaces.
type Histogram ¶
Histogram returns the count of events in pre-determined buckets.
type LastValue ¶
LastValue returns the latest value that was aggregated.
type Max ¶
Max returns the maximum value over the set of values that were aggregated.
type Min ¶
Min returns the minimum value over the set of values that were aggregated.
type MinMaxSumCount ¶
MinMaxSumCount supports the Min, Max, Sum, and Count interfaces.
type Points ¶
Points returns the raw set of values that were aggregated.
type Quantile ¶
Quantile returns an exact or estimated quantile over the set of values that were aggregated.
type Sum ¶
Sum returns an aggregated sum.
Source Files ¶
aggregator.go
- Version
- v0.6.0
- Published
- May 21, 2020
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 5 minutes ago –
Tools for package owners.