class documentation
class AuthMetricsRecorder: (source)
Constructor: AuthMetricsRecorder(metrics, provider)
Small mutable auth metrics recorder with a fixed provider label.
| Method | __init__ |
Undocumented |
| Method | cache |
Emit a cache hit event. |
| Method | cache |
Emit a cache invalidation event. |
| Method | cache |
Emit a cache miss event. |
| Method | cache |
Emit a cache refresh event. |
| Method | cache |
Emit a cache store event. |
| Method | set |
Replace callbacks, sharing callback state with recorders when given. |
| Method | token |
Emit a token acquisition event. |
| Method | token |
Emit token acquisition duration and optional token lifetime. |
| Method | token |
Emit token lifetime when the token has an aware expiration timestamp. |
| Method | token |
Emit a token refresh event. |
| Instance Variable | provider |
Undocumented |
| Instance Variable | _cell |
Undocumented |
def token_acquire_from_start(self, result:
MetricResult, start: float, attempt: int, token: object | None = None):
(source)
¶
Emit token acquisition duration and optional token lifetime.
start must come from metric_start. When token is
provided for a successful acquisition, its lifetime is emitted too.