metrics

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSizeBucket added in v1.23.0

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 added in v1.23.0

func SinceInSeconds(start time.Time) float64

SinceInSeconds gets the time since specified start in seconds.

func UnaryInterceptor added in v1.17.0

func UnaryInterceptor() grpc.UnaryServerInterceptor

UnaryInterceptor adds all necessary metrics to incoming gRPC requests

Types

type Metrics added in v1.22.0

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

Metrics is the main structure for starting the metrics endpoints.

func Instance added in v1.22.0

func Instance() *Metrics

Instance returns the singleton instance of the Metrics.

func New added in v1.22.0

func New(config *libconfig.MetricsConfig) *Metrics

New creates a new metrics instance.

func (*Metrics) MetricContainersOOMCountTotalInc added in v1.23.0

func (m *Metrics) MetricContainersOOMCountTotalInc(name string)

func (*Metrics) MetricContainersOOMTotalInc added in v1.22.0

func (m *Metrics) MetricContainersOOMTotalInc()

func (*Metrics) MetricImageLayerReuseInc added in v1.22.0

func (m *Metrics) MetricImageLayerReuseInc(layer string)

func (*Metrics) MetricImagePullsByDigestAdd added in v1.22.0

func (m *Metrics) MetricImagePullsByDigestAdd(add float64, values ...string)

func (*Metrics) MetricImagePullsByNameAdd added in v1.22.0

func (m *Metrics) MetricImagePullsByNameAdd(add float64, values ...string)

func (*Metrics) MetricImagePullsByNameSkippedAdd added in v1.22.0

func (m *Metrics) MetricImagePullsByNameSkippedAdd(add float64, name string)

func (*Metrics) MetricImagePullsBytesAdd added in v1.23.0

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

func (*Metrics) MetricImagePullsFailuresInc added in v1.22.0

func (m *Metrics) MetricImagePullsFailuresInc(image, label string)

func (*Metrics) MetricImagePullsLayerSizeObserve added in v1.22.0

func (m *Metrics) MetricImagePullsLayerSizeObserve(size int64)

func (*Metrics) MetricImagePullsSkippedBytesAdd added in v1.23.0

func (m *Metrics) MetricImagePullsSkippedBytesAdd(add float64)

func (*Metrics) MetricImagePullsSuccessesInc added in v1.22.0

func (m *Metrics) MetricImagePullsSuccessesInc(name string)

func (*Metrics) MetricOperationsErrorsInc added in v1.22.0

func (m *Metrics) MetricOperationsErrorsInc(operation string)

func (*Metrics) MetricOperationsInc added in v1.22.0

func (m *Metrics) MetricOperationsInc(operation string)

func (*Metrics) MetricOperationsLatencySet added in v1.22.0

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

func (*Metrics) MetricOperationsLatencyTotalObserve added in v1.22.0

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

func (*Metrics) Start added in v1.22.0

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

Start starts serving the metrics in the background.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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