Summary
The SDK's ReadMetrics and WriteMetrics have a rate field but it's always None. The SDK should compute messages/second automatically.
Proposed Solution
- Track previous count and timestamp for each topic in
ReadState and WriteState
- Compute messages/second rate on each
collect() call
- Rate should be
None on first collection (no baseline available)
- Require at least 10ms between samples to avoid division issues
Benefits
- Real-time throughput visibility without manual calculation
- Consistent rate computation across all topics
Implementation Notes
Already implemented in PR #8