Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Labels ¶
type Labels []Label
Labels contains the set of Label instances for a metric.
type Metric ¶
Metric represents a single Prometheus metric line, including its labels and timestamp.
func ParseMetric ¶
ParseMetric parses a single Prometheus metric line.
Note: The implementation currently only supports integer values and also doesn't handle escaped characters nor multiple sequential whitespace characters. This is OK for now because this only needs to support metrics generated by the various influx-spout components.
type MetricSet ¶
type MetricSet struct {
// contains filtered or unexported fields
}
MetricSet is a collection of metrics. Metrics are indexed by name and labels combined. Existing metrics will be updated if an update for the same name and labels arrives.
func ParseMetrics ¶
ParseMetrics parses multiple Prometheus metric lines, returning a MetricSet.
func (*MetricSet) ToBytes ¶
ToBytes serialise the metrics contained in the MetricSet to the Prometheus exposition format.
func (*MetricSet) Update ¶
Update adds a new metric or updates an existing one in the set, overwriting previous values.
func (*MetricSet) UpdateFromSet ¶
UpdateFromSet updates the values in the set from another MetricSet.