mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-01 21:52:02 +08:00
Now that all backends implement backend.BackendWithItems the temporary interface is removed and the Items method is included in backend.Backend. All wrapper implementations, and backend mocks were updated accordingly. The backend reporter used to tally prometheus metrics was updated with new metrics to track streaming requests since reusing the batch read requests wouldn't make sense for iteration. This means that once upstream consumers of the backend start switching from GetRange to Items the batch read metrics will not be the complete source of truth. The streaming metrics also lack some of the same observability since chunk sizes and latency of reads cannot be known at the reporter level. The only way to provide the same batch metrics that we have today would require each backend implementation to be responsible for updating the metrics when performing their internal reads to supply the Items iterator.