metrics

package
v0.0.0-...-8680cc4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 7 Imported by: 16

Documentation

Index

Constants

View Source
const (
	ActionCreateLabel    = "create"
	ActionDeleteLabel    = "delete"
	ActionRemoveLabel    = "remove"
	ActionUpdateLabel    = "update"
	ActionUpgradeLabel   = "upgrade"
	ActionInfoLabel      = "info"
	ActionListLabel      = "list"
	ActionStatusLabel    = "status"
	ActionStartLabel     = "start"
	ActionStopLabel      = "stop"
	ActionKillLabel      = "kill"
	ActionRenameLabel    = "rename"
	ActionRestartLabel   = "restart"
	ActionRunLabel       = "run"
	ActionPullLabel      = "pull"
	ActionStatsLabel     = "stats"
	ActionStatsListLabel = "stats_list"
	ActionPauseLabel     = "pause"
	ActionUnpauseLabel   = "unpause"
)

Action labels for different pod/container/image operations.

Variables

This section is empty.

Functions

func GetPrometheusHandler

func GetPrometheusHandler() http.Handler

GetPrometheusHandler return the prometheus handler.

func GetPrometheusRegistry

func GetPrometheusRegistry() *prometheus.Registry

GetPrometheusRegistry return a resigtry of Prometheus.

func NewLabelCounter

func NewLabelCounter(subsystem, name, help string, labels ...string) *prometheus.CounterVec

NewLabelCounter return a new CounterVec

func NewLabelGauge

func NewLabelGauge(subsystem, name, help string, labels ...string) *prometheus.GaugeVec

NewLabelGauge return a new GaugeVec

func NewLabelSummary

func NewLabelSummary(subsystem, name, help string, labels ...string) *prometheus.SummaryVec

NewLabelSummary return a new SummaryVec

func NewLabelTimer

func NewLabelTimer(subsystem, name, help string, labels ...string) *prometheus.HistogramVec

NewLabelTimer return a new HistogramVec

func SinceInMicroseconds

func SinceInMicroseconds(start time.Time) float64

SinceInMicroseconds gets the time since the specified start in microseconds.

Types

type Unit

type Unit string

Unit represents the type or precision of a metric that is appended to the metrics fully qualified name

Jump to

Keyboard shortcuts

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