metrics

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestLatency is a prometheus metric which is a histogram of the latency
	// of processing admission requests.
	RequestLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name: "controller_runtime_webhook_latency_seconds",
			Help: "Histogram of the latency of processing admission requests",
		},
		[]string{"webhook"},
	)

	// RequestTotal is a prometheus metric which is a counter of the total processed admission requests.
	RequestTotal = func() *prometheus.CounterVec {
		return prometheus.NewCounterVec(
			prometheus.CounterOpts{
				Name: "controller_runtime_webhook_requests_total",
				Help: "Total number of admission requests by HTTP status code.",
			},
			[]string{"webhook", "code"},
		)
	}()

	// RequestInFlight is a prometheus metric which is a gauge of the in-flight admission requests.
	RequestInFlight = func() *prometheus.GaugeVec {
		return prometheus.NewGaugeVec(
			prometheus.GaugeOpts{
				Name: "controller_runtime_webhook_requests_in_flight",
				Help: "Current number of admission requests being served.",
			},
			[]string{"webhook"},
		)
	}()
)

Functions

func InstrumentedHook added in v0.9.0

func InstrumentedHook(path string, hookRaw http.Handler) http.Handler

InstrumentedHook adds some instrumentation on top of the given webhook.

Types

This section is empty.

Jump to

Keyboard shortcuts

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