collector

package
v0.0.0-...-883cb22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const NAMESPACE = "saptune"

Variables

This section is empty.

Functions

func RecordConcurrently

func RecordConcurrently(recorders []func(ch chan<- prometheus.Metric) error, ch chan<- prometheus.Metric) []error

Run multiple metric recording functions concurrently

Types

type DefaultCollector

type DefaultCollector struct {
	// contains filtered or unexported fields
}

func NewDefaultCollector

func NewDefaultCollector(subsystem string) DefaultCollector

func (*DefaultCollector) Describe

func (c *DefaultCollector) Describe(ch chan<- *prometheus.Desc)

func (*DefaultCollector) GetDescriptor

func (c *DefaultCollector) GetDescriptor(name string) *prometheus.Desc

func (*DefaultCollector) MakeCounterMetric

func (c *DefaultCollector) MakeCounterMetric(name string, value float64, labelValues ...string) prometheus.Metric

func (*DefaultCollector) MakeGaugeMetric

func (c *DefaultCollector) MakeGaugeMetric(name string, value float64, labelValues ...string) prometheus.Metric

func (*DefaultCollector) SetDescriptor

func (c *DefaultCollector) SetDescriptor(name, help string, variableLabels []string)

Convenience wrapper around prometheus.NewDesc constructor. Stores a metric descriptor with a fully qualified name like `NAMESPACE_subsystem_name`. `name` is the last and most relevant part of the metrics Full Qualified Name; `help` is the message displayed in the HELP line `variableLabels` is a list of labels to declare. Use `nil` to declare no labels.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL