package metrics

import "k8s.io/apiserver/pkg/storage/value/encrypt/envelope/metrics"

Index

Constants

const (
	FromStorageLabel = "from_storage"
	ToStorageLabel   = "to_storage"
)

Variables

var (
	KMSOperationsLatencyMetric = metrics.NewHistogramVec(
		&metrics.HistogramOpts{
			Namespace:      namespace,
			Subsystem:      subsystem,
			Name:           "kms_operations_latency_seconds",
			Help:           "KMS operation duration with gRPC error code status total.",
			StabilityLevel: metrics.ALPHA,

			Buckets: metrics.ExponentialBuckets(0.001, 2, 18),
		},
		[]string{"provider_name", "method_name", "grpc_status_code"},
	)
)

* By default, all the following metrics are defined as falling under * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/1209-metrics-stability/kubernetes-control-plane-metrics-stability.md#stability-classes) * * Promoting the stability level of the metric is a responsibility of the component owner, since it * involves explicitly acknowledging support for the metric across multiple releases, in accordance with * the metric stability policy.

Functions

func RecordArrival

func RecordArrival(transformationType string, start time.Time)

func RecordDekCacheFillPercent

func RecordDekCacheFillPercent(percent float64)

func RecordKMSOperationLatency

func RecordKMSOperationLatency(providerName, methodName string, duration time.Duration, err error)

RecordKMSOperationLatency records the latency of KMS operation.

func RegisterMetrics

func RegisterMetrics()

Source Files

metrics.go

Version
v0.27.0-alpha.2
Published
Feb 15, 2023
Platform
js/wasm
Imports
7 packages
Last checked
1 hour ago

Tools for package owners.