package metrics
import "sigs.k8s.io/controller-runtime/pkg/webhook/internal/metrics"
Index ¶
Variables ¶
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", NativeHistogramBucketFactor: 1.1, NativeHistogramMaxBucketNumber: 100, NativeHistogramMinResetDuration: 1 * time.Hour, }, []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 ¶
InstrumentedHook adds some instrumentation on top of the given webhook.
Source Files ¶
metrics.go
- Version
- v0.21.0 (latest)
- Published
- May 20, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 2 hours ago –
Tools for package owners.