Documentation ¶
Index ¶
Constants ¶
This section is empty.
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 ¶ added in v0.2.2
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 Distribution ¶
type Distribution interface { MinMaxSumCount Quantile }
Distribution supports the Min, Max, Sum, Count, and Quantile interfaces.
type Min ¶ added in v0.2.0
Min returns the minimum value over the set of values that were aggregated.
type MinMaxSumCount ¶ added in v0.2.0
MinMaxSumCount supports the Min, Max, Sum, and Count interfaces.