Documentation
¶
Overview ¶
Package metrics provides Prometheus metrics for the minecraft-operator.
Index ¶
- type NoopRecorder
- type PrometheusRecorder
- func (r *PrometheusRecorder) RecordPluginAPICall(source string, err error, duration time.Duration)
- func (r *PrometheusRecorder) RecordReconcile(controller string, err error, duration time.Duration)
- func (r *PrometheusRecorder) RecordSolverRun(solverType string, err error, duration time.Duration)
- func (r *PrometheusRecorder) RecordUpdate(success bool)
- type Recorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoopRecorder ¶
type NoopRecorder struct{}
NoopRecorder is a no-op implementation of Recorder for use in tests.
func (*NoopRecorder) RecordPluginAPICall ¶
func (n *NoopRecorder) RecordPluginAPICall(_ string, _ error, _ time.Duration)
func (*NoopRecorder) RecordReconcile ¶
func (n *NoopRecorder) RecordReconcile(_ string, _ error, _ time.Duration)
func (*NoopRecorder) RecordSolverRun ¶
func (n *NoopRecorder) RecordSolverRun(_ string, _ error, _ time.Duration)
func (*NoopRecorder) RecordUpdate ¶
func (n *NoopRecorder) RecordUpdate(_ bool)
type PrometheusRecorder ¶
type PrometheusRecorder struct {
// contains filtered or unexported fields
}
PrometheusRecorder implements Recorder using Prometheus metrics.
func NewPrometheusRecorder ¶
func NewPrometheusRecorder(reg prometheus.Registerer) *PrometheusRecorder
NewPrometheusRecorder creates a PrometheusRecorder and registers all metrics with the provided prometheus.Registerer.
func (*PrometheusRecorder) RecordPluginAPICall ¶
func (r *PrometheusRecorder) RecordPluginAPICall(source string, err error, duration time.Duration)
func (*PrometheusRecorder) RecordReconcile ¶
func (r *PrometheusRecorder) RecordReconcile(controller string, err error, duration time.Duration)
func (*PrometheusRecorder) RecordSolverRun ¶
func (r *PrometheusRecorder) RecordSolverRun(solverType string, err error, duration time.Duration)
func (*PrometheusRecorder) RecordUpdate ¶
func (r *PrometheusRecorder) RecordUpdate(success bool)
type Recorder ¶
type Recorder interface {
// RecordReconcile records a reconciliation loop completion.
RecordReconcile(controller string, err error, duration time.Duration)
// RecordPluginAPICall records a plugin repository API call.
RecordPluginAPICall(source string, err error, duration time.Duration)
// RecordSolverRun records a constraint solver invocation.
RecordSolverRun(solverType string, err error, duration time.Duration)
// RecordUpdate records a server update attempt.
RecordUpdate(success bool)
}
Recorder defines the interface for recording operator metrics.
Click to show internal directories.
Click to hide internal directories.