Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
Counter describes a metric that accumulates values monotonically. An example of a counter is the number of received HTTP requests.
type Gauge ¶
Gauge describes a metric that takes specific values over time. An example of a gauge is the current depth of a job queue.
type Histogram ¶
Histogram describes a metric that takes repeated observations of the same kind of thing, and produces a statistical summary of those observations, typically expressed as quantiles or buckets. An example of a histogram is HTTP request latencies.
type LabelValues ¶
type LabelValues []string
LabelValues is a type alias that provides validation on its With method. Metrics may include it as a member to help them satisfy With semantics and save some code duplication.
func (LabelValues) With ¶
func (lvs LabelValues) With(labelValues ...string) LabelValues
With validates the input, and returns a new aggregate labelValues.
type Space ¶
type Space struct {
// contains filtered or unexported fields
}
Space represents an N-dimensional vector space. Each name and unique label value pair establishes a new dimension and point within that dimension. Order matters, i.e. [a=1 b=2] identifies a different timeseries than [b=2 a=1].
func (*Space) Add ¶
func (s *Space) Add(name string, lvs LabelValues, delta float64)
Add locates the time series identified by the name and label values in the vector space, and appends the delta to the last value in the list of observations.
func (*Space) Observe ¶
func (s *Space) Observe(name string, lvs LabelValues, value float64)
Observe locates the time series identified by the name and label values in the vector space, and appends the value to the list of observations.