metrics

package
v0.0.0-...-e645d6f Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LastReloadError = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: namespace,
		Name:      "config_reloader_last_reload_error",
		Help:      "Whether the last reload resulted in an error (1 for error, 0 for success)",
	}, []string{"webhook"})
	RequestDuration = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: namespace,
		Name:      "config_reloader_last_request_duration_seconds",
		Help:      "Duration of last webhook request",
	}, []string{"webhook"})
	SuccessReloads = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespace,
		Name:      "config_reloader_success_reloads_total",
		Help:      "Total success reload calls",
	}, []string{"webhook"})
	RequestErrorsByReason = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespace,
		Name:      "config_reloader_request_errors_total",
		Help:      "Total request errors by reason",
	}, []string{"webhook", "reason"})
	WatcherErrors = prometheus.NewCounter(prometheus.CounterOpts{
		Namespace: namespace,
		Name:      "config_reloader_watcher_errors_total",
		Help:      "Total filesystem watcher errors",
	})
	RequestsByStatusCode = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: namespace,
		Name:      "config_reloader_requests_total",
		Help:      "Total requests by response status code",
	}, []string{"webhook", "status_code"})
)

Functions

func Run

func Run() error

func SetFailureMetrics

func SetFailureMetrics(h, reason string)

func SetSuccessMetrics

func SetSuccessMetrics(h string, begun time.Time)

Types

This section is empty.

Jump to

Keyboard shortcuts

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