Documentation ¶
Overview ¶
Package eagle provides a functionality to export Prometheus metrics aggregated over configured time interval. This can be useful when you want to use Prometheus library to instrument your code but still want to periodically export metrics to non Prometheus monitoring systems.
Index ¶
Constants ¶
View Source
const ( MetricTypeCounter = "counter" MetricTypeGauge = "gauge" MetricTypeSummary = "summary" )
Various metric types eagle supports.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Gatherer prometheus.Gatherer Interval time.Duration Sink chan<- Metrics QuantileSep string }
Config of Eagle instance.
type Eagle ¶
type Eagle struct {
// contains filtered or unexported fields
}
Eagle allows to periodically export Prometheus metrics aggregated over configured time interval.
type Metric ¶
type Metric struct { Type MetricType `json:"type"` Namespace string `json:"namespace"` Subsystem string `json:"subsystem"` Name string `json:"name"` Help string `json:"help,omitempty"` Values []MetricValue `json:"values,omitempty"` }
Metric is a single Prometheus metric that can have many MetricValue.
type MetricValue ¶
type MetricValue struct { Name string `json:"name"` Labels []string `json:"labels,omitempty"` Value float64 `json:"value"` }
MetricValue is a concrete value of certain metric.
Click to show internal directories.
Click to hide internal directories.