metrics

package
v0.11.1 Latest Latest
Warning

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

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

Documentation

Overview

Package metrics contains a Prometheus metrics registry that importing code can use to register Prometheus metrics. When all metrics collection is complete, the PushToPrometheus function can be used to push metrics to a Prometheus Pushgateway server, which is configured through viper.

Index

Constants

This section is empty.

Variables

View Source
var (
	// MetricsRegistry is a prometheus registry that can be exported and used by importing libraries
	MetricsRegistry = prometheus.NewRegistry()
)

Functions

func PushToPrometheus

func PushToPrometheus(hostName, jobName string) error

PushToPrometheus uses the package MetricsRegistry to push registered metrics to the configured Prometheus pushgateway

Types

This section is empty.

Jump to

Keyboard shortcuts

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