metrics

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetricsPath is the endpoint to collect rollout metrics
	MetricsPath = "/metrics"
)

Variables

This section is empty.

Functions

func NewRolloutCollector

func NewRolloutCollector(rolloutLister rolloutlister.RolloutLister) prometheus.Collector

NewRolloutCollector returns a prometheus collector for rollout metrics

func NewRolloutRegistry

func NewRolloutRegistry(rolloutLister rolloutlister.RolloutLister) *prometheus.Registry

NewRolloutRegistry creates a new prometheus registry that collects rollouts

Types

type MetricsServer

type MetricsServer struct {
	*http.Server
	// contains filtered or unexported fields
}

func NewMetricsServer

func NewMetricsServer(addr string, rolloutLister rolloutlister.RolloutLister) *MetricsServer

NewMetricsServer returns a new prometheus server which collects rollout metrics

func (*MetricsServer) IncError

func (m *MetricsServer) IncError(namespace, name string)

IncError increments the reconcile counter for an rollout

func (*MetricsServer) IncReconcile

func (m *MetricsServer) IncReconcile(rollout *v1alpha1.Rollout, duration time.Duration)

IncReconcile increments the reconcile counter for an rollout

type RolloutPhase

type RolloutPhase string

RolloutPhase the phases of a reconcile can have

const (

	// InvalidSpec means the rollout had an InvalidSpec during reconciliation
	InvalidSpec RolloutPhase = "InvalidSpec"
	// Completed means the rollout finished the reconciliation with no remaining work
	Completed RolloutPhase = "Completed"
	// Progressing means the rollout finished the reconciliation with remaining work
	Progressing RolloutPhase = "Progressing"
	// Paused means the rollout finished the reconciliation with a paused status
	Paused RolloutPhase = "Paused"
	// Timeout means the rollout finished the reconciliation with an timeout message
	Timeout RolloutPhase = "Timeout"
	// Error means the rollout finished the reconciliation with an error
	Error RolloutPhase = "Error"
)

Jump to

Keyboard shortcuts

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