metrics

package
v0.24.1 Latest Latest
Warning

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

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

Documentation

Overview

Package metrics provides metric support specific to the run controller.

Index

Constants

View Source
const (

	// WorkqueueName is the name of the run controller workqueue.
	// It is required by the metrics adapter for workqueues.
	WorkqueueName = "runctl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterMetric

type CounterMetric interface {
	Inc()
}

CounterMetric is a monotonic counter metric.

var (
	// ControllerHeartbeats counts the number of heartbeats of
	// the run controller.
	ControllerHeartbeats CounterMetric = &controllerHeartbeats{}
)
var (
	// PipelineRunsStarted counts the pipeline runs that have been started.
	PipelineRunsStarted CounterMetric = &pipelineRunsStarted{}
)

type PipelineRunsMetric

type PipelineRunsMetric interface {
	Observe(pipelineRun *stewardapi.PipelineRun)
}

PipelineRunsMetric observes pipeline runs.

var (
	// PipelineRunsPeriodic is a metric that observes all existing pipeline runs
	// periodically.
	PipelineRunsPeriodic PipelineRunsMetric = &pipelineRunsPeriodic{}
)

type ResultsMetric

type ResultsMetric interface {
	Observe(result stewardapi.Result)
}

ResultsMetric observes the result of a finished pipeline run.

var (
	// PipelineRunsResult counts the number of pipeline runs by result type.
	PipelineRunsResult ResultsMetric = &pipelineRunsResult{}
)

type SettableGaugeMetric

type SettableGaugeMetric interface {
	Set(float64)
}

SettableGaugeMetric is a numeric metric that can be set to a value.

type StateItemsMetric

type StateItemsMetric interface {
	Observe(state *stewardapi.StateItem)
}

StateItemsMetric observes a StateItem

var (
	// PipelineRunsStateFinished is a metric that observes the state
	// of pipeline runs that has just been finished.
	PipelineRunsStateFinished StateItemsMetric = &pipelineRunsStateFinished{}
)

type UpdatesLatencyMetric

type UpdatesLatencyMetric interface {
	Observe(typ string, duration time.Duration)
}

UpdatesLatencyMetric is the interface of UpdatesLatency

var (
	// UpdatesLatency is a metric that observes the duration of updates
	// partitioned by a "type".
	UpdatesLatency UpdatesLatencyMetric = &updatesLatency{}
)

Directories

Path Synopsis
Package testing is a generated GoMock package.
Package testing is a generated GoMock package.

Jump to

Keyboard shortcuts

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