Skip to content

Commit 191094e

Browse files
committed
exec credential provider: try to simplify calls metric
Signed-off-by: Andrew Keesler <[email protected]>
1 parent 9a8390f commit 191094e

File tree

1 file changed

+9
-21
lines changed
  • keps/sig-auth/541-external-credential-providers

1 file changed

+9
-21
lines changed

keps/sig-auth/541-external-credential-providers/README.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ credentials are used for mTLS handshakes.
496496

497497
### Metrics
498498

499-
As discussed [below](#rollout-upgrade-and-rollback-planning), there are 4
499+
As discussed [below](#rollout-upgrade-and-rollback-planning), there are 3
500500
primary metrics used by this feature set.
501501

502502
```golang
@@ -550,17 +550,9 @@ var (
550550
execPluginCalls = k8smetrics.NewCounterVec(
551551
&k8smetrics.CounterOpts{
552552
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",
561553
Help: "Number of calls to an exec plugin, partitioned by exit code.",
562554
},
563-
[]string{"exitCode"},
555+
[]string{"code"},
564556
)
565557
)
566558
```
@@ -580,9 +572,7 @@ type ExpiryMetric interface {
580572

581573
// CallsMetric counts calls that take place for a specific exec plugin.
582574
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.
586576
Increment(exitCode int)
587577
}
588578

@@ -591,16 +581,14 @@ var (
591581
ClientCertExpiry ExpiryMetric = noopExpiry{}
592582
// ClientCertRotationAge is the age of a certificate that has just been rotated.
593583
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.
595586
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{}
599587
)
600588
```
601589

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.
604592

605593
### Risks and Mitigations
606594

@@ -827,7 +815,7 @@ _This section must be completed when targeting beta graduation to a release._
827815
determine the health of the service?**
828816
- [X] Metrics
829817
- 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`
831819
- Components exposing the metric: client-go
832820
- [ ] Other (treat as last resort)
833821
- Details:
@@ -840,7 +828,7 @@ _This section must be completed when targeting beta graduation to a release._
840828
`rest_client_exec_plugin_ttl_seconds`.
841829
- We target 0.01% unsuccessful calls to the exec plugin in a moving 24h
842830
window. This is measured by
843-
`rest_client_exec_plugin_calls` and `rest_client_exec_plugin_failed_calls`.
831+
`rest_client_exec_plugin_calls`.
844832

845833
* **Are there any missing metrics that would be useful to have to improve
846834
observability if this feature?**

0 commit comments

Comments
 (0)