Skip to content

Commit 6b34c1a

Browse files
committed
exec credential provider: update metrics stuff for what was shipped
Signed-off-by: Andrew Keesler <[email protected]>
1 parent 841863e commit 6b34c1a

File tree

1 file changed

+10
-7
lines changed
  • keps/sig-auth/541-external-credential-providers

1 file changed

+10
-7
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,12 @@ var (
550550
execPluginCalls = k8smetrics.NewCounterVec(
551551
&k8smetrics.CounterOpts{
552552
Name: "rest_client_exec_plugin_call_total",
553-
Help: "Number of calls to an exec plugin, partitioned by exit code.",
553+
Help: "Number of calls to an exec plugin, partitioned by the type of " +
554+
"event encountered (no_error, plugin_execution_error, plugin_not_found_error, " +
555+
"client_internal_error) and an optional exit code. The exit code will " +
556+
"be set to 0 if and only if the plugin call was successful.",
554557
},
555-
[]string{"code"},
558+
[]string{"code", "call_status"},
556559
)
557560
)
558561
```
@@ -572,8 +575,8 @@ type ExpiryMetric interface {
572575

573576
// CallsMetric counts calls that take place for a specific exec plugin.
574577
type CallsMetric interface {
575-
// Increment increments a counter per exitCode.
576-
Increment(exitCode int)
578+
// Increment increments a counter per exitCode and callStatus.
579+
Increment(exitCode int, callStatus string)
577580
}
578581

579582
var (
@@ -582,13 +585,13 @@ var (
582585
// ClientCertRotationAge is the age of a certificate that has just been rotated.
583586
ClientCertRotationAge DurationMetric = noopDuration{}
584587
// ExecPluginCalls is the number of calls made to an exec plugin, partitioned by
585-
// exit code.
588+
// exit code and call status.
586589
ExecPluginCalls CallsMetric = noopCalls{}
587590
)
588591
```
589592

590-
The `"code"` label of these metrics is an attempt to elucidate the exec plugin
591-
failure mode to the user.
593+
The `"code"` and `"call_status"` labels of these metrics are an attempt to
594+
elucidate the exec plugin failure mode to the user.
592595

593596
### Risks and Mitigations
594597

0 commit comments

Comments
 (0)