metrics

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildStrategyLabel string = "buildstrategy"
	NamespaceLabel     string = "namespace"
	BuildLabel         string = "build"
	BuildRunLabel      string = "buildrun"
	StrategyKindLabel  string = "strategy_kind"
	ExecutorLabel      string = "executor"
	ResultLabel        string = "result"
	SourceTypeLabel    string = "source_type"
)

Labels used in Prometheus metrics

View Source
const (
	ResultSucceeded = "succeeded"
	ResultFailed    = "failed"
	ResultCanceled  = "canceled"
	ResultTimeout   = "timeout"
)

Result label values for build_buildrun_result_total

Variables

This section is empty.

Functions

func BuildCountInc

func BuildCountInc(buildStrategy, namespace, build, strategyKind, sourceType string)

BuildCountInc increases the total count of registered Builds

func BuildRunCompletionObserve

func BuildRunCompletionObserve(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType string, duration time.Duration)

BuildRunCompletionObserve sets the build run completion time

func BuildRunEstablishObserve

func BuildRunEstablishObserve(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType string, duration time.Duration)

BuildRunEstablishObserve sets the build run establish time

func BuildRunFailureReasonCountInc added in v0.21.0

func BuildRunFailureReasonCountInc(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType, reason string)

BuildRunFailureReasonCountInc increments the build_buildrun_failure_reason_total counter

func BuildRunRampUpDurationObserve

func BuildRunRampUpDurationObserve(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType string, duration time.Duration)

BuildRunRampUpDurationObserve processes the observation of a new buildrun ramp-up duration

func BuildRunResultCountInc added in v0.21.0

func BuildRunResultCountInc(buildStrategy, namespace, build, buildRun, strategyKind, executor, result, sourceType string)

BuildRunResultCountInc increments the build_buildrun_result_total counter

func BuildRunsActiveDec added in v0.21.0

func BuildRunsActiveDec(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType string)

BuildRunsActiveDec decrements the build_buildruns_active gauge

func BuildRunsActiveInc added in v0.21.0

func BuildRunsActiveInc(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType string)

BuildRunsActiveInc increments the build_buildruns_active gauge

func BuildStrategyCountSet added in v0.21.0

func BuildStrategyCountSet(strategyKind string, count float64)

BuildStrategyCountSet sets the build_buildstrategy_count gauge

func ExtraHandlers added in v0.4.0

func ExtraHandlers() map[string]http.HandlerFunc

ExtraHandlers returns a mapping of paths and their respective additional HTTP handlers to be configured at the metrics listener

func InitPrometheus

func InitPrometheus(config *config.Config)

InitPrometheus initializes the prometheus stuff

func TaskRunPodRampUpDurationObserve

func TaskRunPodRampUpDurationObserve(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType string, duration time.Duration)

TaskRunPodRampUpDurationObserve processes the observation of a new taskrun pod ramp-up duration

func TaskRunRampUpDurationObserve

func TaskRunRampUpDurationObserve(buildStrategy, namespace, build, buildRun, strategyKind, executor, sourceType string, duration time.Duration)

TaskRunRampUpDurationObserve processes the observation of a new taskrun ramp-up duration

Types

This section is empty.

Jump to

Keyboard shortcuts

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