metric

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OAuthSuccessRateCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: namespace,
			Name:      "call",
			Help:      "Number of oauth2 call outcome per endpoint",
		},
		[]string{
			"oauth_endpoint",
			"outcome",
		},
	)

	OAuthDurationHist = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Namespace: namespace,
			Name:      "call_dur",
			Help:      "Histogram for the duration of oauth2 call",
		},
		[]string{"oauth_endpoint"},
	)
)

Functions

func DeferMonitorError

func DeferMonitorError(endpoint string, err *error)

func MonitorError

func MonitorError(endpoint string, err error)

func MonitorOutcome

func MonitorOutcome(endpoint, outcome string)

func PrometheusMetricsRegister

func PrometheusMetricsRegister()

PrometheusMetricsRegister Register metrics with prometheus

Types

This section is empty.

Jump to

Keyboard shortcuts

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