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") ErrNonMonotoneInput = fmt.Errorf("the new value is not monotone") ErrInconsistentType = fmt.Errorf("inconsistent aggregator types") // ErrNoLastValue is returned by the LastValue interface when // (due to a race with collection) the Aggregator is // checkpointed before the first value is set. The aggregator // should simply be skipped in this case. ErrNoLastValue = fmt.Errorf("no value has been set") // ErrEmptyDataSet is returned by Max and Quantile interfaces // when (due to a race with collection) the Aggregator is // checkpointed before the first value is set. The aggregator // should simply be skipped in this case. ErrEmptyDataSet = fmt.Errorf("the result is not defined on an empty data set") )
NewInconsistentMergeError formats an error describing an attempt to merge different-type aggregators. The result can be unwrapped as an ErrInconsistentType.
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 measure metrics.
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]
Sum returns the number of values that were aggregated.
Distribution supports the Min, Max, Sum, Count, and Quantile interfaces.
Histogram returns the count of events in pre-determined buckets.
LastValue returns the latest value that was aggregated.
Max returns the maximum value over the set of values that were aggregated.
Min returns the minimum value over the set of values that were aggregated.
MinMaxSumCount supports the Min, Max, Sum, and Count interfaces.
Points returns the raw set of values that were aggregated.
Quantile returns an exact or estimated quantile over the set of values that were aggregated.
Sum returns an aggregated sum.