Documentation ¶
Index ¶
- func MetricsOnStore(logger *zap.SugaredLogger) func(name string, value interface{})
- func WithClient(ctx context.Context) context.Context
- func WithInformer(ctx context.Context) (context.Context, controller.Informer)
- type InformerKey
- type Recorder
- func (r *Recorder) CloudEvents(tr *v1beta1.TaskRun) error
- func (r *Recorder) DurationAndCount(tr *v1beta1.TaskRun) error
- func (r *Recorder) RecordPodLatency(pod *corev1.Pod, tr *v1beta1.TaskRun) error
- func (r *Recorder) ReportRunningTaskRuns(ctx context.Context, lister listers.TaskRunLister)
- func (r *Recorder) RunningTaskRuns(lister listers.TaskRunLister) error
- type RecorderKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MetricsOnStore ¶
func MetricsOnStore(logger *zap.SugaredLogger) func(name string, value interface{})
MetricsOnStore returns a function that checks if metrics are configured for a config.Store, and registers it if so
func WithClient ¶
WithClient adds a metrics recorder to the given context
func WithInformer ¶
WithInformer returns the given context, and a configured informer
Types ¶
type InformerKey ¶
type InformerKey struct{}
InformerKey is used for associating the Informer inside the context.Context.
type Recorder ¶
Recorder is used to actually record TaskRun metrics
func NewRecorder ¶
NewRecorder creates a new metrics recorder instance to log the TaskRun related metrics
func (*Recorder) CloudEvents ¶
CloudEvents logs the number of cloud events sent for TaskRun returns an error if it fails to log the metrics
func (*Recorder) DurationAndCount ¶
DurationAndCount logs the duration of TaskRun execution and count for number of TaskRuns succeed or failed returns an error if its failed to log the metrics
func (*Recorder) RecordPodLatency ¶
RecordPodLatency logs the duration required to schedule the pod for TaskRun returns an error if its failed to log the metrics
func (*Recorder) ReportRunningTaskRuns ¶
func (r *Recorder) ReportRunningTaskRuns(ctx context.Context, lister listers.TaskRunLister)
ReportRunningTaskRuns invokes RunningTaskRuns on our configured PeriodSeconds until the context is cancelled.
func (*Recorder) RunningTaskRuns ¶
func (r *Recorder) RunningTaskRuns(lister listers.TaskRunLister) error
RunningTaskRuns logs the number of TaskRuns running right now returns an error if its failed to log the metrics
type RecorderKey ¶
type RecorderKey struct{}
RecorderKey is used for associating the Recorder inside the context.Context.