metrics

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSizeBucket

func GetSizeBucket(size float64) string

GetSizeBucket gets a bucket name for given size sorted according to 1 KiB, 1 MiB, 10 MiB, ...

func SinceInMicroseconds

func SinceInMicroseconds(start time.Time) float64

SinceInMicroseconds gets the time since the specified start in microseconds.

func SinceInSeconds

func SinceInSeconds(start time.Time) float64

SinceInSeconds gets the time since specified start in seconds.

func UnaryInterceptor

func UnaryInterceptor() grpc.UnaryServerInterceptor

UnaryInterceptor adds all necessary metrics to incoming gRPC requests

Types

type Metrics

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

Metrics is the main structure for starting the metrics endpoints.

func Instance

func Instance() *Metrics

Instance returns the singleton instance of the Metrics.

func New

func New(config *libconfig.MetricsConfig) *Metrics

New creates a new metrics instance.

func (*Metrics) MetricContainersEventsDroppedInc

func (m *Metrics) MetricContainersEventsDroppedInc()

func (*Metrics) MetricContainersOOMCountTotalDelete

func (m *Metrics) MetricContainersOOMCountTotalDelete(name string)

func (*Metrics) MetricContainersOOMCountTotalInc

func (m *Metrics) MetricContainersOOMCountTotalInc(name string)

func (*Metrics) MetricContainersOOMTotalInc

func (m *Metrics) MetricContainersOOMTotalInc()

func (*Metrics) MetricContainersSeccompNotifierCountTotalInc

func (m *Metrics) MetricContainersSeccompNotifierCountTotalInc(name, syscall string)

func (*Metrics) MetricImageLayerReuseInc

func (m *Metrics) MetricImageLayerReuseInc(layer string)

func (*Metrics) MetricImagePullsBytesAdd

func (m *Metrics) MetricImagePullsBytesAdd(add float64, mediatype string, size int64)

func (*Metrics) MetricImagePullsFailuresInc

func (m *Metrics) MetricImagePullsFailuresInc(image references.RegistryImageReference, label string)

func (*Metrics) MetricImagePullsLayerSizeObserve

func (m *Metrics) MetricImagePullsLayerSizeObserve(size int64)

func (*Metrics) MetricImagePullsSkippedBytesAdd

func (m *Metrics) MetricImagePullsSkippedBytesAdd(add float64)

func (*Metrics) MetricImagePullsSuccessesInc

func (m *Metrics) MetricImagePullsSuccessesInc(name references.RegistryImageReference)

func (*Metrics) MetricOperationsErrorsInc

func (m *Metrics) MetricOperationsErrorsInc(operation string)

func (*Metrics) MetricOperationsInc

func (m *Metrics) MetricOperationsInc(operation string)

func (*Metrics) MetricOperationsLatencySet

func (m *Metrics) MetricOperationsLatencySet(operation string, start time.Time)

func (*Metrics) MetricOperationsLatencyTotalObserve

func (m *Metrics) MetricOperationsLatencyTotalObserve(operation string, start time.Time)

func (*Metrics) MetricResourcesStalledAtStage

func (m *Metrics) MetricResourcesStalledAtStage(stage string)

func (*Metrics) Start

func (m *Metrics) Start(stop chan struct{}) error

Start starts serving the metrics in the background.

Jump to

Keyboard shortcuts

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