prometheus

package
Version: v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

Recorder knows how to measure the metrics of the library using Prometheus as the backend for the measurements.

func NewRecorder

func NewRecorder(config RecorderConfig) (*Recorder, error)

NewRecorder returns a new Prometheus metrics recorder.

func (Recorder) MeasureMutatingWebhookReviewOp

func (r Recorder) MeasureMutatingWebhookReviewOp(_ context.Context, data webhook.MeasureMutatingOpData)

MeasureMutatingWebhookReviewOp measures a mutating webhook review operation on Prometheus.

func (Recorder) MeasureValidatingWebhookReviewOp

func (r Recorder) MeasureValidatingWebhookReviewOp(_ context.Context, data webhook.MeasureValidatingOpData)

MeasureValidatingWebhookReviewOp measures a validating webhook review operation on Prometheus.

type RecorderConfig

type RecorderConfig struct {
	Registry        prometheus.Registerer
	ReviewOpBuckets []float64
}

RecorderConfig is the configuration of the recorder.

Source Files

Jump to

Keyboard shortcuts

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