taskrunmetrics

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithClient

func WithClient(ctx context.Context) context.Context

WithClient adds a metrics recorder to the given context

Types

type Recorder

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

Recorder is used to actually record TaskRun metrics.

func Get

func Get(ctx context.Context) *Recorder

Get extracts the taskrunmetrics.Recorder from the context.

func NewRecorder

func NewRecorder(ctx context.Context) (*Recorder, error)

NewRecorder creates a new metrics recorder instance to log the TaskRun related metrics.

func (*Recorder) RecordCountMetrics

func (r *Recorder) RecordCountMetrics(ctx context.Context, metricType common.Metric)

RecordCountMetrics implements github.com/tektoncd/chains/pkg/metrics.Recorder.RecordCountMetrics

func (*Recorder) RecordErrorMetric added in v0.26.0

func (r *Recorder) RecordErrorMetric(ctx context.Context, errType common.MetricErrorType)

RecordErrorMetric records a TaskRun signing failure with a given error type tag.

type RecorderKey

type RecorderKey struct{}

RecorderKey is used for associating the Recorder inside the context.Context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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