Documentation ¶
Index ¶
- Constants
- func NewAnalysisRunCollector(analysisRunLister rolloutlister.AnalysisRunLister) prometheus.Collector
- func NewExperimentCollector(experimentLister rolloutlister.ExperimentLister) prometheus.Collector
- func NewRolloutCollector(rolloutLister rolloutlister.RolloutLister) prometheus.Collector
- type K8sRequestsCountProvider
- type MetricsServer
- func (m *MetricsServer) IncAnalysisRunReconcile(ar *v1alpha1.AnalysisRun, duration time.Duration)
- func (m *MetricsServer) IncError(namespace, name string, kind string)
- func (m *MetricsServer) IncExperimentReconcile(ex *v1alpha1.Experiment, duration time.Duration)
- func (m *MetricsServer) IncRolloutReconcile(rollout *v1alpha1.Rollout, duration time.Duration)
- type RolloutPhase
- type ServerConfig
Constants ¶
const (
// MetricsPath is the endpoint to collect rollout metrics
MetricsPath = "/metrics"
)
Variables ¶
This section is empty.
Functions ¶
func NewAnalysisRunCollector ¶ added in v0.8.0
func NewAnalysisRunCollector(analysisRunLister rolloutlister.AnalysisRunLister) prometheus.Collector
NewAnalysisRunCollector returns a prometheus collector for AnalysisRun metrics
func NewExperimentCollector ¶ added in v0.8.0
func NewExperimentCollector(experimentLister rolloutlister.ExperimentLister) prometheus.Collector
NewExperimentCollector returns a prometheus collector for experiment metrics
func NewRolloutCollector ¶
func NewRolloutCollector(rolloutLister rolloutlister.RolloutLister) prometheus.Collector
NewRolloutCollector returns a prometheus collector for rollout metrics
Types ¶
type K8sRequestsCountProvider ¶ added in v0.8.0
type K8sRequestsCountProvider struct {
// contains filtered or unexported fields
}
func (*K8sRequestsCountProvider) IncKubernetesRequest ¶ added in v0.8.0
func (m *K8sRequestsCountProvider) IncKubernetesRequest(resourceInfo kubeclientmetrics.ResourceInfo)
IncKubernetesRequest increments the kubernetes client counter
func (*K8sRequestsCountProvider) MustRegister ¶ added in v0.8.0
func (f *K8sRequestsCountProvider) MustRegister(registerer prometheus.Registerer)
type MetricsServer ¶
func NewMetricsServer ¶
func NewMetricsServer(cfg ServerConfig) *MetricsServer
NewMetricsServer returns a new prometheus server which collects rollout metrics
func (*MetricsServer) IncAnalysisRunReconcile ¶ added in v0.8.0
func (m *MetricsServer) IncAnalysisRunReconcile(ar *v1alpha1.AnalysisRun, duration time.Duration)
IncAnalysisRunReconcile increments the reconcile counter for an AnalysisRun
func (*MetricsServer) IncError ¶
func (m *MetricsServer) IncError(namespace, name string, kind string)
IncError increments the reconcile counter for an rollout
func (*MetricsServer) IncExperimentReconcile ¶ added in v0.8.0
func (m *MetricsServer) IncExperimentReconcile(ex *v1alpha1.Experiment, duration time.Duration)
IncExperimentReconcile increments the reconcile counter for an Experiment
func (*MetricsServer) IncRolloutReconcile ¶ added in v0.8.0
func (m *MetricsServer) IncRolloutReconcile(rollout *v1alpha1.Rollout, duration time.Duration)
IncRolloutReconcile increments the reconcile counter for a Rollout
type RolloutPhase ¶
type RolloutPhase string
RolloutPhase the phases of a reconcile can have
const ( // RolloutInvalidSpec means the rollout had an invalid spec during reconciliation RolloutInvalidSpec RolloutPhase = "InvalidSpec" // RolloutCompleted means the rollout finished the reconciliation with no remaining work RolloutCompleted RolloutPhase = "Completed" // RolloutProgressing means the rollout finished the reconciliation with remaining work RolloutProgressing RolloutPhase = "Progressing" // RolloutPaused means the rollout finished the reconciliation with a paused status RolloutPaused RolloutPhase = "Paused" // RolloutTimeout means the rollout finished the reconciliation with an timeout message RolloutTimeout RolloutPhase = "Timeout" // RolloutError means the rollout finished the reconciliation with an error RolloutError RolloutPhase = "Error" // RolloutAbort means the rollout finished the reconciliation in an aborted state RolloutAbort RolloutPhase = "Abort" )
type ServerConfig ¶ added in v0.8.0
type ServerConfig struct { Addr string RolloutLister rolloutlister.RolloutLister AnalysisRunLister rolloutlister.AnalysisRunLister ExperimentLister rolloutlister.ExperimentLister K8SRequestProvider *K8sRequestsCountProvider }