feat(rivetkit): add current actor metrics#5020
Conversation
c6e4baf to
93e7a3b
Compare
|
Review: feat(rivetkit): add current actor metrics
OverviewThis PR graduates several no-op actor metric methods into real implementations, adding gauges and counters for queue depth, active connections, inbox depths, user task counts, HTTP requests, keep-awake counts, shutdown drain counts, and SQLite worker state. The core mechanism is an aggregated gauge pattern: each The test in Issues1.
|
93e7a3b to
6d50b18
Compare
PR Review: feat(rivetkit): add current actor metricsOverviewThis PR adds real-time gauge metrics for per-actor state (queue depth, active connections, inbox depths, user task counts, HTTP requests, keep-awake work, SQLite worker activity). The core design uses a delta-based aggregation pattern via Correctness
Gauge-vs-counter ordering in
Code QualityVariable naming in The function now has both String-keyed match in fn set_inbox_depth(&self, inbox: &'static str, depth: usize) {
let current = match inbox {
"lifecycle" => &mut state.lifecycle_inbox_depth,
"dispatch" => &mut state.dispatch_inbox_depth,
"lifecycle_event" => &mut state.lifecycle_event_inbox_depth,
_ => unreachable!("unknown inbox metric label"),
};This is internal-only and the
This asymmetry means querying "total keep-awake work" for an actor requires summing over both PerformanceThe Tests
Minor Notes
SummaryThe aggregation design is sound and the |

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: