Files
teleport/lib/utils/interval
rosstimothy b8f2853c37 Add metric to expose cluster role count (#47731)
* Add metric to expose cluster role count

A new `teleport_roles_total` is added to count the number of roles
in the cluster. The metric is intentionally updated infrequently
to avoid putting any additional strain on the backend. Additionally,
the reads performed when calculating the metric are rate limited
to prevent any bursts in reads when the metric timer does fire.

The auth periodic tickers have also been consolidated into a single
multi-interval instead of a ticker per operation. To prevent the
sub-intervals from impacting each other all operations are moved
to their own goroutine once their ticker fires.

* Convert multi to use a clock

* fix: specify a smallish page size
2024-10-22 13:20:16 +00:00
..