Documentation
¶
Index ¶
- Variables
- func AddToContext(warn error, ctx context.Context)
- func Coalesce(a, b error) error
- func ConvertHistogramError(err error) error
- func FromContext(ctx context.Context) annotations.Annotations
- func MergeToContext(annos annotations.Annotations, ctx context.Context)
- func NewContext(ctx context.Context) context.Context
- type Warnings
Constants ¶
This section is empty.
Variables ¶
View Source
var MixedFloatsHistogramsAggWarning = fmt.Errorf("%w aggregation", annotations.MixedFloatsHistogramsWarning)
MixedFloatsHistogramsAggWarning is used when an aggregation encounters both floats and histograms. We define this here because Prometheus's NewMixedFloatsHistogramsAggWarning requires a posrange which we don't have at the accumulator level.
Functions ¶
func AddToContext ¶
func ConvertHistogramError ¶ added in v0.5.0
ConvertHistogramError converts histogram operation errors to appropriate annotation warnings. Returns nil if the error is not a histogram error.
func FromContext ¶
func FromContext(ctx context.Context) annotations.Annotations
func MergeToContext ¶
func MergeToContext(annos annotations.Annotations, ctx context.Context)
Types ¶
type Warnings ¶ added in v0.5.0
type Warnings uint32
Warnings is a bitset of warning flags that can be returned by functions to indicate warning conditions. The actual warning messages with metric names are emitted by operators that have access to series labels.
const ( WarnNotCounter Warnings = 1 << iota WarnNotGauge WarnMixedFloatsHistograms WarnMixedExponentialCustomBuckets WarnHistogramIgnoredInMixedRange // for _over_time functions, only when both floats and histograms WarnHistogramIgnoredInAggregation // for aggregations (max, min, stddev, etc.), always when histograms ignored WarnCounterResetCollision WarnNHCBBoundsReconciled // for subtraction operations (rate, irate, delta) WarnNHCBBoundsReconciledAgg // for aggregation operations (sum, avg, sum_over_time, avg_over_time) WarnIncompatibleTypesInBinOp )
Click to show internal directories.
Click to hide internal directories.