Add reason field to faied_scale_ups_total metric
For now it's just a placeholder, will add proper logic for next release
This commit is contained in:
		
							parent
							
								
									9f7cdb8b56
								
							
						
					
					
						commit
						7f7243ea98
					
				| 
						 | 
				
			
			@ -129,12 +129,12 @@ var (
 | 
			
		|||
		},
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
	failedScaleUpCount = prometheus.NewCounter(
 | 
			
		||||
	failedScaleUpCount = prometheus.NewCounterVec(
 | 
			
		||||
		prometheus.CounterOpts{
 | 
			
		||||
			Namespace: caNamespace,
 | 
			
		||||
			Name:      "failed_scale_ups_total",
 | 
			
		||||
			Help:      "Number of times scale-up operation has failed.",
 | 
			
		||||
		},
 | 
			
		||||
		}, []string{"reason"},
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
	scaleDownCount = prometheus.NewCounterVec(
 | 
			
		||||
| 
						 | 
				
			
			@ -232,7 +232,8 @@ func RegisterScaleUp(nodesCount int) {
 | 
			
		|||
 | 
			
		||||
// RegisterFailedScaleUp records a failed scale-up operation
 | 
			
		||||
func RegisterFailedScaleUp() {
 | 
			
		||||
	failedScaleUpCount.Inc()
 | 
			
		||||
	// TODO(maciekpytel): add real reasons
 | 
			
		||||
	failedScaleUpCount.WithLabelValues("unknown").Inc()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RegisterScaleDown records number of nodes removed by scale down
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue