validation

package
v0.0.0-...-ee1864c Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DiscardedSamples = prometheus.NewCounterVec(
	prometheus.CounterOpts{
		Name: "cortex_discarded_samples_total",
		Help: "The total number of samples that were discarded.",
	},
	[]string{discardReasonLabel},
)

DiscardedSamples is a metric of the number of discarded samples, by reason.

Functions

This section is empty.

Types

type Config

type Config struct {
	// maximum length a label name can be
	MaxLabelNameLength int

	// maximum length a label value can be. This also is the maximum length of a metric name.
	MaxLabelValueLength int

	// maximum number of label/value pairs timeseries.
	MaxLabelNamesPerSeries int

	// Config for rejecting old samples.
	RejectOldSamples       bool
	RejectOldSamplesMaxAge time.Duration
	CreationGracePeriod    time.Duration
}

Config for validation settings and options.

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers a set of command line flags for setting options regarding sample validation at ingestion time.

func (*Config) ValidateLabels

func (cfg *Config) ValidateLabels(ls []client.LabelPair) error

ValidateLabels returns an err if the labels are invalid.

func (*Config) ValidateSample

func (cfg *Config) ValidateSample(metricName []byte, s client.Sample) error

ValidateSample returns an err if the sample is invalid.

Jump to

Keyboard shortcuts

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