Documentation
¶
Index ¶
Constants ¶
View Source
const (
PsrNamespace = "psr"
)
Variables ¶
This section is empty.
Functions ¶
func BuildMetricDescList ¶
func BuildMetricDescList(metrics []*MetricItem, labels map[string]string, workerMetricsName string) []prometheus.Desc
func StartMetricsServerOrDie ¶
func StartMetricsServerOrDie(providers []spi.WorkerMetricsProvider)
StartMetricsServerOrDie starts the metrics server. If there is an error the code exits
Types ¶
type MetricItem ¶
type MetricItem struct {
Val int64
Desc *prometheus.Desc
Name string
Help string
Type prometheus.ValueType
ConstLabels prometheus.Labels
VarLabels []string
}
MetricItem contains the information for a single metric
func (*MetricItem) BuildMetric ¶
func (m *MetricItem) BuildMetric() prometheus.Metric
BuildMetric builds the prometheus metrics from the MetricItem
func (*MetricItem) BuildMetricDesc ¶
func (m *MetricItem) BuildMetricDesc(workerMetricsName string) *prometheus.Desc
BuildMetricDesc builds the MetricItem description from info about the metric and worker
Click to show internal directories.
Click to hide internal directories.