@@ -496,7 +496,7 @@ credentials are used for mTLS handshakes.
496
496
497
497
### Metrics
498
498
499
- As discussed [ below] ( #rollout-upgrade-and-rollback-planning ) , there are 4
499
+ As discussed [ below] ( #rollout-upgrade-and-rollback-planning ) , there are 3
500
500
primary metrics used by this feature set.
501
501
502
502
``` golang
@@ -550,17 +550,9 @@ var (
550
550
execPluginCalls = k8smetrics.NewCounterVec (
551
551
&k8smetrics.CounterOpts {
552
552
Name : " rest_client_exec_plugin_calls" ,
553
- Help : " Number of calls to an exec plugin." ,
554
- },
555
- []string {},
556
- )
557
-
558
- execPluginFailedCalls = k8smetrics.NewCounterVec (
559
- &k8smetrics.CounterOpts {
560
- Name : " rest_client_exec_plugin_failed_calls" ,
561
553
Help : " Number of calls to an exec plugin, partitioned by exit code." ,
562
554
},
563
- []string {" exitCode " },
555
+ []string {" code " },
564
556
)
565
557
)
566
558
```
@@ -580,9 +572,7 @@ type ExpiryMetric interface {
580
572
581
573
// CallsMetric counts calls that take place for a specific exec plugin.
582
574
type CallsMetric interface {
583
- // Increment increments a counter. The provided exitCode is optional,
584
- // so that this interface can be used for when a call takes place
585
- // but the exit code does not matter.
575
+ // Increment increments a counter per exitCode.
586
576
Increment (exitCode int )
587
577
}
588
578
@@ -591,16 +581,14 @@ var (
591
581
ClientCertExpiry ExpiryMetric = noopExpiry{}
592
582
// ClientCertRotationAge is the age of a certificate that has just been rotated.
593
583
ClientCertRotationAge DurationMetric = noopDuration{}
594
- // ExecPluginCalls is the number of calls made to an exec plugin.
584
+ // ExecPluginCalls is the number of calls made to an exec plugin, partitioned by
585
+ // exit code.
595
586
ExecPluginCalls CallsMetric = noopCalls{}
596
- // ExecPluginFailedCalls is the number of calls made to an exec plugin that fail.
597
- // I.e., when the binary returns a non-zero exit code.
598
- ExecPluginFailedCalls CallsMetric = noopCalls{}
599
587
)
600
588
```
601
589
602
- The ` "exitCode " ` label of these metrics is an attempt to elucidate the exec
603
- plugin failure mode to the user.
590
+ The ` "code " ` label of these metrics is an attempt to elucidate the exec plugin
591
+ failure mode to the user.
604
592
605
593
### Risks and Mitigations
606
594
@@ -827,7 +815,7 @@ _This section must be completed when targeting beta graduation to a release._
827
815
determine the health of the service?**
828
816
- [X] Metrics
829
817
- Metric name: ` rest_client_exec_plugin_ttl_seconds ` , ` rest_client_exec_plugin_certificate_rotation_age ` ,
830
- ` rest_client_exec_plugin_calls ` , ` rest_client_exec_plugin_failed_calls `
818
+ ` rest_client_exec_plugin_calls `
831
819
- Components exposing the metric: client-go
832
820
- [ ] Other (treat as last resort)
833
821
- Details:
@@ -840,7 +828,7 @@ _This section must be completed when targeting beta graduation to a release._
840
828
` rest_client_exec_plugin_ttl_seconds ` .
841
829
- We target 0.01% unsuccessful calls to the exec plugin in a moving 24h
842
830
window. This is measured by
843
- ` rest_client_exec_plugin_calls ` and ` rest_client_exec_plugin_failed_calls ` .
831
+ ` rest_client_exec_plugin_calls ` .
844
832
845
833
* ** Are there any missing metrics that would be useful to have to improve
846
834
observability if this feature?**
0 commit comments