metrics

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metrics provides unified metrics recording for Tekton Results. It includes metrics for tracking runs not stored and storage latency for both PipelineRuns, TaskRuns, and CustomRuns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountRunNotStored

func CountRunNotStored(ctx context.Context, namespace, kind string) error

CountRunNotStored records a run that was not stored due to deletion or timeout

func EnsureMetricsInitialized added in v0.19.0

func EnsureMetricsInitialized(logger *zap.SugaredLogger)

EnsureMetricsInitialized ensures all shared metrics are initialized exactly once. Subsequent calls are no-ops. This is safe to call multiple times from any goroutine.

Types

type Recorder

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

Recorder is used to record metrics for both PipelineRuns and TaskRuns

func NewRecorder

func NewRecorder() *Recorder

NewRecorder creates a new metrics recorder instance

func (*Recorder) RecordStorageLatency

func (r *Recorder) RecordStorageLatency(ctx context.Context, object interface{}) error

RecordStorageLatency records the storage latency metric for both PipelineRuns and TaskRuns

Jump to

Keyboard shortcuts

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