magicblock-labs / magicblock-labs/redsuite
Consolidate metrics collection and sampling
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- Avg merge
- 3h 58m
- Merged PRs (30d)
- 48
Description
## Outcome
Metrics sampling reuses HTTP connections and consistently reports observation failures.
## Scope
[Every metrics scrape](https://github.com/magicblock-labs/redsuite/blob/06c80157f8bc87c39ac48fd59367a8e9280d2db9/crates/redsuite-core/src/api.rs#L771) calls [get_once](https://github.com/magicblock-labs/redsuite/blob/06c80157f8bc87c39ac48fd59367a8e9280d2db9/crates/redsuite-core/src/transport/http.rs#L63), which creates a fresh HTTP client. [Busy-executor sampling](https://github.com/magicblock-labs/redsuite/blob/06c80157f8bc87c39ac48fd59367a8e9280d2db9/redline/src/scenarios/scheduler/executor_saturation.rs#L405), [conflict-ordering sampling](https://github.com/magicblock-labs/redsuite/blob/06c80157f8bc87c39ac48fd59367a8e9280d2db9/redline/src/scenarios/scheduler/conflict_ordering.rs#L541), and [steady-state monitoring](https://github.com/magicblock-labs/redsuite/blob/06c80157f8bc87c39ac48fd59367a8e9280d2db9/crates/redsuite-core/src/monitor.rs#L66) duplicate polling and lifecycle behavior; some turn worker failures into empty observations.
Retain an HTTP client per collector and share sampler lifecycle, shutdown, coverage, and error reporting. Keep metric selection, reduction, and verdict policy scenario-specific. Use online aggregation where raw sample history is unnecessary.
## Acceptance criteria
- [ ] Repeated scrapes reuse a client.
- [ ] Sampler failures cannot silently become successful empty observations.
- [ ] Sampling gaps and missing required metrics are distinguishable from zero activity.
- [ ] Mean/max-only consumers do not retain unnecessary raw histories.
- [ ] Successful-path metric meanings remain unchanged, and shutdown does not leave sampling work running.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.