metrics

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 12 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 and TaskRuns.

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 IdempotentRegisterViews

func IdempotentRegisterViews(logger *zap.SugaredLogger)

IdempotentRegisterViews ensures all shared views are registered exactly once. If views are already registered, it does nothing. If views were previously registered but may be stale, it unregisters and re-registers them.

func OnStore

func OnStore(logger *zap.SugaredLogger) func(name string, value any)

OnStore returns a function that checks if metrics are configured for a config.Store, and registers it if so

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