@@ -94,9 +94,12 @@ type CustomMetrics struct {
9494 ISBServicePausedSeconds * prometheus.GaugeVec
9595
9696 // Progressive Rollout Metrics
97- PipelineProgressiveResults * prometheus.CounterVec
98- IsbSvcProgressiveResults * prometheus.CounterVec
99- MonoVertexProgressiveResults * prometheus.CounterVec
97+ PipelineProgressiveStarted * prometheus.CounterVec
98+ PipelineProgressiveCompleted * prometheus.CounterVec
99+ ISBServiceProgressiveStarted * prometheus.CounterVec
100+ ISBServiceProgressiveCompleted * prometheus.CounterVec
101+ MonovertexProgressiveStarted * prometheus.CounterVec
102+ MonovertexProgressiveCompleted * prometheus.CounterVec
100103}
101104
102105const (
@@ -351,26 +354,47 @@ var (
351354 ConstLabels : defaultLabels ,
352355 }, []string {})
353356
354- // pipelineProgressiveResults count the total number of pipeline progressive rollout results
355- pipelineProgressiveResults = promauto .NewCounterVec (prometheus.CounterOpts {
356- Name : "numaplane_pipeline_progressive_results_total " ,
357- Help : "The total number of pipeline progressive rollout results " ,
357+ // pipelineProgressiveStarted count the total number of pipeline progressive rollouts started
358+ pipelineProgressiveStarted = promauto .NewCounterVec (prometheus.CounterOpts {
359+ Name : "numaplane_pipeline_progressive_started " ,
360+ Help : "The total number of pipeline progressive rollout started " ,
358361 ConstLabels : defaultLabels ,
359- }, []string {LabelNamespace , LabelName , LabelRolloutName , LabelSuccess , LabelForcedSuccess , LabelResourceHealthSuccess , LabelCompleted })
362+ }, []string {LabelNamespace , LabelRolloutName , LabelName })
360363
361- //ISBSvcProgressiveResults count the total number of isbsvc progressive rollout results
362- isbSvcProgressiveResults = promauto .NewCounterVec (prometheus.CounterOpts {
363- Name : "numaplane_isbsvc_progressive_results_total " ,
364- Help : "The total number of isbsvc progressive rollout results " ,
364+ // pipelineProgressiveResults count the total number of pipeline progressive rollouts completed
365+ pipelineProgressiveCompleted = promauto .NewCounterVec (prometheus.CounterOpts {
366+ Name : "numaplane_pipeline_progressive_completed " ,
367+ Help : "The total number of pipeline progressive rollout completed " ,
365368 ConstLabels : defaultLabels ,
366- }, []string {LabelNamespace , LabelName , LabelRolloutName , LabelSuccess , LabelForcedSuccess , LabelResourceHealthSuccess , LabelCompleted })
369+ }, []string {LabelNamespace , LabelRolloutName , LabelName , LabelSuccess , LabelForcedSuccess , LabelResourceHealthSuccess })
367370
368- // MonoVertexProgressiveResults count the total number of monovertex progressive rollout results
369- monoVertexProgressiveResults = promauto .NewCounterVec (prometheus.CounterOpts {
370- Name : "numaplane_monovertex_progressive_results_total " ,
371- Help : "The total number of monovertex progressive rollout results " ,
371+ // isbServiceProgressiveStarted count the total number of ISB Service progressive rollouts started
372+ isbServiceProgressiveStarted = promauto .NewCounterVec (prometheus.CounterOpts {
373+ Name : "numaplane_isbsvc_progressive_started " ,
374+ Help : "The total number of pipeline isbsvc rollout started " ,
372375 ConstLabels : defaultLabels ,
373- }, []string {LabelNamespace , LabelName , LabelRolloutName , LabelSuccess , LabelForcedSuccess , LabelResourceHealthSuccess , LabelCompleted })
376+ }, []string {LabelNamespace , LabelRolloutName , LabelName })
377+
378+ //isbServiceProgressiveCompleted count the total number of isbsvc progressive rollouts completed
379+ isbServiceProgressiveCompleted = promauto .NewCounterVec (prometheus.CounterOpts {
380+ Name : "numaplane_isbsvc_progressive_completed" ,
381+ Help : "The total number of isbsvc progressive rollout completed" ,
382+ ConstLabels : defaultLabels ,
383+ }, []string {LabelNamespace , LabelRolloutName , LabelName , LabelSuccess , LabelForcedSuccess , LabelResourceHealthSuccess })
384+
385+ // monovertexProgressiveStarted count the total number of monovertex progressive rollouts started
386+ monovertexProgressiveStarted = promauto .NewCounterVec (prometheus.CounterOpts {
387+ Name : "numaplane_monovertex_progressive_started" ,
388+ Help : "The total number of monovertex rollout started" ,
389+ ConstLabels : defaultLabels ,
390+ }, []string {LabelNamespace , LabelRolloutName , LabelName })
391+
392+ // monovertexProgressiveCompleted count the total number of monovertex progressive rollout completed
393+ monovertexProgressiveCompleted = promauto .NewCounterVec (prometheus.CounterOpts {
394+ Name : "numaplane_monovertex_progressive_completed" ,
395+ Help : "The total number of monovertex progressive rollout completed" ,
396+ ConstLabels : defaultLabels ,
397+ }, []string {LabelNamespace , LabelRolloutName , LabelName , LabelSuccess , LabelForcedSuccess , LabelResourceHealthSuccess })
374398)
375399
376400// RegisterCustomMetrics registers the custom metrics to the existing global prometheus registry for pipelines, ISB service and numaflow controller
@@ -382,8 +406,8 @@ func RegisterCustomMetrics(numaLogger *logger.NumaLogger) *CustomMetrics {
382406 numaflowControllerRolloutsHealth , numaflowControllerRolloutsRunning , numaflowControllerRolloutSyncs , numaflowControllerRolloutSyncErrors , numaflowControllerRolloutPausedSeconds ,
383407 numaflowControllersHealth , numaflowControllerSyncs , numaflowControllerSyncErrors , numaflowControllerKubectlExecutionCounter ,
384408 reconciliationDuration , kubeRequestCounter , kubeResourceCacheMonitored ,
385- kubeResourceCache , clusterCacheError , pipelinePausedSeconds , pipelinePausingSeconds , isbServicePausedSeconds , pipelineProgressiveResults ,
386- isbSvcProgressiveResults , monoVertexProgressiveResults )
409+ kubeResourceCache , clusterCacheError , pipelinePausedSeconds , pipelinePausingSeconds , isbServicePausedSeconds ,
410+ pipelineProgressiveStarted , pipelineProgressiveCompleted , isbServiceProgressiveStarted , isbServiceProgressiveCompleted , monovertexProgressiveStarted , monovertexProgressiveCompleted )
387411
388412 return & CustomMetrics {
389413 NumaLogger : numaLogger ,
@@ -421,9 +445,12 @@ func RegisterCustomMetrics(numaLogger *logger.NumaLogger) *CustomMetrics {
421445 PipelinePausedSeconds : pipelinePausedSeconds ,
422446 PipelinePausingSeconds : pipelinePausingSeconds ,
423447 ISBServicePausedSeconds : isbServicePausedSeconds ,
424- PipelineProgressiveResults : pipelineProgressiveResults ,
425- IsbSvcProgressiveResults : isbSvcProgressiveResults ,
426- MonoVertexProgressiveResults : monoVertexProgressiveResults ,
448+ PipelineProgressiveStarted : pipelineProgressiveStarted ,
449+ PipelineProgressiveCompleted : pipelineProgressiveCompleted ,
450+ ISBServiceProgressiveStarted : isbServiceProgressiveStarted ,
451+ ISBServiceProgressiveCompleted : isbServiceProgressiveCompleted ,
452+ MonovertexProgressiveStarted : monovertexProgressiveStarted ,
453+ MonovertexProgressiveCompleted : monovertexProgressiveCompleted ,
427454 }
428455}
429456
@@ -600,16 +627,28 @@ func (m *CustomMetrics) IncProgressivePipelineDrains(namespace, pipelineRolloutN
600627 m .ProgressivePipelineDrains .WithLabelValues (namespace , pipelineRolloutName , pipelineName , strconv .FormatBool (drainComplete ), string (drainResult )).Inc ()
601628}
602629
603- func (m * CustomMetrics ) IncPipelineProgressiveResults (namespace , name , childName string , basicAssessmentResult , successStatus util.OptionalBoolStr , forcedSuccess , completed bool ) {
604- m .PipelineProgressiveResults .WithLabelValues (namespace , childName , name , successStatus .ToString (), strconv .FormatBool (forcedSuccess ), basicAssessmentResult .ToString (), strconv .FormatBool (completed )).Inc ()
630+ func (m * CustomMetrics ) IncPipelineProgressiveStarted (namespace , rolloutName , pipelineName string ) {
631+ m .PipelineProgressiveStarted .WithLabelValues (namespace , rolloutName , pipelineName ).Inc ()
632+ }
633+
634+ func (m * CustomMetrics ) IncPipelineProgressiveCompleted (namespace , rolloutName , pipelineName string , basicAssessmentResult , successStatus util.OptionalBoolStr , forcedSuccess bool ) {
635+ m .PipelineProgressiveCompleted .WithLabelValues (namespace , rolloutName , pipelineName , successStatus .ToString (), strconv .FormatBool (forcedSuccess ), basicAssessmentResult .ToString ()).Inc ()
636+ }
637+
638+ func (m * CustomMetrics ) IncIBSServiceProgressiveStarted (namespace , rolloutName , isbServiceName string ) {
639+ m .ISBServiceProgressiveStarted .WithLabelValues (namespace , rolloutName , isbServiceName ).Inc ()
640+ }
641+
642+ func (m * CustomMetrics ) IncISBServiceProgressiveCompleted (namespace , rolloutName , isbServiceName string , basicAssessmentResult , successStatus util.OptionalBoolStr , forcedSuccess bool ) {
643+ m .ISBServiceProgressiveCompleted .WithLabelValues (namespace , rolloutName , isbServiceName , successStatus .ToString (), strconv .FormatBool (forcedSuccess ), basicAssessmentResult .ToString ()).Inc ()
605644}
606645
607- func (m * CustomMetrics ) IncISBSvcProgressiveResults (namespace , name , childName string , basicAssessmentResult , successStatus util. OptionalBoolStr , forcedSuccess , completed bool ) {
608- m .IsbSvcProgressiveResults .WithLabelValues (namespace , childName , name , successStatus . ToString (), strconv . FormatBool ( forcedSuccess ), basicAssessmentResult . ToString (), strconv . FormatBool ( completed ) ).Inc ()
646+ func (m * CustomMetrics ) IncMonovertexProgressiveStarted (namespace , rolloutName , monovertexName string ) {
647+ m .MonovertexProgressiveStarted .WithLabelValues (namespace , rolloutName , monovertexName ).Inc ()
609648}
610649
611- func (m * CustomMetrics ) IncMonovertexProgressiveResults (namespace , name , childName string , basicAssessmentResult , successStatus util.OptionalBoolStr , forcedSuccess , completed bool ) {
612- m .MonoVertexProgressiveResults .WithLabelValues (namespace , childName , name , successStatus .ToString (), strconv .FormatBool (forcedSuccess ), basicAssessmentResult .ToString (), strconv . FormatBool ( completed )).Inc ()
650+ func (m * CustomMetrics ) IncMonovertexProgressiveCompleted (namespace , rolloutName , monovertexName string , basicAssessmentResult , successStatus util.OptionalBoolStr , forcedSuccess bool ) {
651+ m .MonovertexProgressiveCompleted .WithLabelValues (namespace , rolloutName , monovertexName , successStatus .ToString (), strconv .FormatBool (forcedSuccess ), basicAssessmentResult .ToString ()).Inc ()
613652}
614653
615654func EvaluateSuccessStatusForMetrics (assessmentResult apiv1.AssessmentResult ) util.OptionalBoolStr {
0 commit comments