Documentation ¶
Index ¶
- type Appendable
- type Batch
- func (m *Batch) Append(_ storage.SeriesRef, l labels.Labels, t int64, v float64) (storage.SeriesRef, error)
- func (*Batch) AppendCTZeroSample(_ storage.SeriesRef, l labels.Labels, t, ct int64) (storage.SeriesRef, error)
- func (*Batch) AppendExemplar(_ storage.SeriesRef, l labels.Labels, e exemplar.Exemplar) (storage.SeriesRef, error)
- func (*Batch) AppendHistogram(_ storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram, ...) (storage.SeriesRef, error)
- func (m *Batch) Commit() error
- func (*Batch) Rollback() error
- func (*Batch) UpdateMetadata(_ storage.SeriesRef, l labels.Labels, m metadata.Metadata) (storage.SeriesRef, error)
- type Test
- func CounterTest() Test
- func EmptyLabelsTest() Test
- func GaugeTest() Test
- func HeadersTest() Test
- func HistogramTest() Test
- func HonorLabelsTest() Test
- func InstanceLabelTest() Test
- func InvalidTest() Test
- func JobLabelTest() Test
- func NameLabelTest() Test
- func OrderingTest() Test
- func RepeatedLabelsTest() Test
- func Retries400Test() Test
- func Retries500Test() Test
- func SortedLabelsTest() Test
- func StalenessTest() Test
- func SummaryTest() Test
- func TimestampTest() Test
- func UpTest() Test
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appendable ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
func (*Batch) AppendCTZeroSample ¶
func (*Batch) AppendExemplar ¶
func (*Batch) AppendHistogram ¶
type Test ¶
type Test struct { Name string Metrics http.Handler Expected Validator // Optional "middleware" to intercept the write requests. Writes func(http.Handler) http.Handler }
func CounterTest ¶
func CounterTest() Test
CounterTest exports a single metric - a counter - and checks that we receive that metric via remote write, and that it has the correct value.
func EmptyLabelsTest ¶
func EmptyLabelsTest() Test
EmptyLabelsTests exports a single, constant metric with an empty labels and checks that we receive the metrics without said label.
func GaugeTest ¶
func GaugeTest() Test
GaugeTest exports a single metric - the current time - and checks that we receive that metric via remote write, and that it has the correct value.
func HeadersTest ¶
func HeadersTest() Test
HeadersTest exports a single metric - a gauge - and checks that we receive the right headers on remote write requests.
func HistogramTest ¶
func HistogramTest() Test
HistogramTest exports a histogram and checks that we receive metrics for it, and that it has the correct value.
func HonorLabelsTest ¶
func HonorLabelsTest() Test
HonorLabels exports a single, constant metric with a job label and checks that we receive metrics a exported_job label.
func InstanceLabelTest ¶
func InstanceLabelTest() Test
InstanceLabel exports a single metric - the current time - and checks that we receive that metric via remote write, and that it has a instance label that we expect.
func InvalidTest ¶
func InvalidTest() Test
InvalidTest exports invalid Prometheus metrics and checks we receive an up == 0 metric for that job.
func JobLabelTest ¶
func JobLabelTest() Test
JobLabel exports a single metric - the current time - and checks that we receive that metric via remote write, and that it has a job label.
func NameLabelTest ¶
func NameLabelTest() Test
NameLabelTests exports a single, constant metric with no name label and checks that we don't receive metrics without a name label - the scape should fail.
func OrderingTest ¶
func OrderingTest() Test
OrderingTest exports a lot of metrics, and inserts random delays in the push handler to see if we can force agents to send us metrics in the wrong order.
func RepeatedLabelsTest ¶
func RepeatedLabelsTest() Test
RepeatedLabelsTest exports a single, constant metric with repeated labels and checks that we don't receive metrics any metrics - the scrape should fail.
func Retries400Test ¶
func Retries400Test() Test
Retries400Test rejects the first remote write and checks it doesn't get resent.
func Retries500Test ¶
func Retries500Test() Test
Retries500Test rejects the first remote write and checks it gets resent.
func SortedLabelsTest ¶
func SortedLabelsTest() Test
SortedLabelsTest exports a single, constant metric with labels in the wrong order and checks that we receive the metrics with sorted labels.
func StalenessTest ¶
func StalenessTest() Test
StalenessTest exposes a single metric that is then removed before the next scrape and checks that the sender propagates a staleness marker.
func SummaryTest ¶
func SummaryTest() Test
SummaryTest exports a single metric - a summary - and checks that we receive that metric via remote write, and that it has the correct value.
func TimestampTest ¶
func TimestampTest() Test
TimestampTest exports a single, constant metric and checks that we receive that metric with "reasonable" timestamps.