Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMetric ¶
func (*BaseMetric) LabelsNames ¶
func (metric *BaseMetric) LabelsNames() []string
type CounterMetric ¶
type CounterMetric struct {
BaseMetric
}
func NewCounterMetric ¶
func NewCounterMetric(metric string, value float64, labels map[string]string) *CounterMetric
type GaugeMetric ¶
type GaugeMetric struct {
BaseMetric
}
func NewGaugeMetric ¶
func NewGaugeMetric(metric string, value float64, labels map[string]string) *GaugeMetric
type Metric ¶
type Metric interface {
// contains filtered or unexported methods
}
Metrics collection methods Antiopa generates the following metrics: hooks errors - shell_operator_hook_errors{hook="hook_name"} counter increases when hook fails - shell_operator_hook_beareable_errors{hook="xxx"} a work counter - shell_operator_live_ticks counter increases every 5 sec. while shell_operator runs. queue length - shell_operator_tasks_queue_length
type MetricCounterVec ¶
type MetricCounterVec struct {
*prometheus.CounterVec
Name string
LabelNames []string
}
func NewMetricCounterVec ¶
func NewMetricCounterVec(counter *prometheus.CounterVec, name string, labelNames []string) *MetricCounterVec
func (*MetricCounterVec) UpdateValue ¶
func (metricVec *MetricCounterVec) UpdateValue(labels prometheus.Labels, value float64)
type MetricGaugeVec ¶
type MetricGaugeVec struct {
*prometheus.GaugeVec
Name string
LabelNames []string
}
func NewMetricGaugeVec ¶
func NewMetricGaugeVec(gauge *prometheus.GaugeVec, name string, labelNames []string) *MetricGaugeVec
func (*MetricGaugeVec) UpdateValue ¶
func (metricVec *MetricGaugeVec) UpdateValue(labels prometheus.Labels, value float64)
type MetricStorage ¶
Структура MetricStorage - регистратор результатов
func Init ¶
func Init() *MetricStorage
func NewMetricStorage ¶
func NewMetricStorage() *MetricStorage
func (*MetricStorage) Run ¶
func (storage *MetricStorage) Run()
func (*MetricStorage) SendCounterMetric ¶
func (storage *MetricStorage) SendCounterMetric(metric string, value float64, labels map[string]string)
func (*MetricStorage) SendGaugeMetric ¶
func (storage *MetricStorage) SendGaugeMetric(metric string, value float64, labels map[string]string)
type MetricVec ¶
type MetricVec interface {
UpdateValue(labels prometheus.Labels, value float64)
}
Click to show internal directories.
Click to hide internal directories.