metrics

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCounter

func AddCounter(name, help string)

AddCounter adds and registers a Counter metric to the prometheus client

func AddGauge

func AddGauge(name, help string)

AddGauge adds and registers a Gauge metric to the prometheus client

func AddHistogram

func AddHistogram(name, help string)

AddHistogram adds and registers an Histogram metric to the prometheus client

func AddSummary

func AddSummary(name, help string)

AddSummary adds and registers an Summary metric to the prometheus client

func ExposeMetrics

func ExposeMetrics()

ExposeMetrics exposes the metrics so they can be queury by a prometheus server

func GetCounter

func GetCounter(name string) (prometheus.Counter, bool)

GetCounter gets a counter metric given the name. It returns two values, the metric and a boolean indicating if the metric exists

func GetGauge

func GetGauge(name string) (prometheus.Gauge, bool)

GetGauge gets a gauge metric given the name. It returns two values, the metric and a boolean indicating if the metric exists

func GetHistogram

func GetHistogram(name string) (prometheus.Histogram, bool)

GetHistogram gets a historic metric given the name. It returns two values, the metric and a boolean indicating if the metric exists

func GetSummary

func GetSummary(name string) (prometheus.Summary, bool)

GetSummary gets a summary metric given the name. It returns two values, the metric and a boolean indicating if the metric exists

func Unregister

func Unregister(name string)

Unregister removes the metric from the exposed metrics

Types

This section is empty.

Jump to

Keyboard shortcuts

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