Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusMetrics ¶
PrometheusMetrics is a struct to push metrics to Prometheus
func NewMetrics ¶
func NewMetrics(instance, pushgatewayURL string) *PrometheusMetrics
NewMetrics returns a new metrics struct
func (*PrometheusMetrics) NewMetric ¶
func (p *PrometheusMetrics) NewMetric(name, mType string) (m *Metric)
NewMetric adds a new metric if it doesn't exist yet or returns the existing matching metric otherwise
func (*PrometheusMetrics) Push ¶
func (p *PrometheusMetrics) Push() (err error)
Push sends metrics to a Prometheus push gateway
Click to show internal directories.
Click to hide internal directories.