metrics

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricError = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNamespace,
		Name:      "error",
		Help:      "Indicates an error was encountered",
	})
	MetricDuration = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNamespace,
		Name:      "run_duration_seconds",
		Help:      "Last runtime duration in seconds",
	})
	MetricLastRun = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNamespace,
		Name:      "last_run_timestamp_seconds",
		Help:      "Last timestamp of execution",
	})
	MetricSubIDTotal = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNamespace,
		Name:      "subid_total",
		Help:      "Total number of subid entries",
	})
	MetricSubIDAdded = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNamespace,
		Name:      "subid_added",
		Help:      "Number of subid entries added",
	})
	MetricSubIDRemoved = prometheus.NewGauge(prometheus.GaugeOpts{
		Namespace: metricsNamespace,
		Name:      "subid_removed",
		Help:      "Number of subid entries removed",
	})
)

Functions

func Duration

func Duration() func()

func Error added in v0.1.1

func Error() func(*error)

func MetricGathers

func MetricGathers(processMetrics bool) prometheus.Gatherers

func MetricsServer

func MetricsServer(listenAddress string) error

func MetricsWrite

func MetricsWrite(path string, gatherers prometheus.Gatherers, logger log.Logger)

func ResetMetrics

func ResetMetrics()

Types

This section is empty.

Jump to

Keyboard shortcuts

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