You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements queue wait time telemetry to distinguish between message
processing slowness vs queue backlog, partially completing Phase 3
(Performance & Optimization).
Message Queue Wait Time (#7):
- joerl_message_queue_wait_seconds: Histogram tracking time messages
spend in queue before being processed
Implementation Details:
- Restructured Envelope from enum to struct containing:
* EnvelopeContent enum (Message or Signal)
* enqueued_at timestamp (conditional on telemetry feature)
- Record enqueue time when Envelope is created
- Calculate and record wait time when envelope is dequeued in actor loop
- Added message_queue_wait() method to MessageMetrics
- Zero-cost when telemetry disabled (timestamp field conditional)
Benefits:
- Distinguish between slow message processing vs queue backlog
- Identify actors with backpressure issues
- Compare queue wait time vs processing duration
- Find bottlenecks in message flow
Documentation:
- Updated TELEMETRY.md with queue wait time metric
- Added PromQL queries for:
* Average queue wait time
* Queue wait time percentiles (p50, p95, p99)
* Processing time vs queue wait time comparison
* Backlog hotspot identification
- Updated TODO.md marking task #7 as completed
Testing:
- All 65 unit tests pass
- All 17 integration tests pass
- All 58 doc tests pass
- Clippy clean with -D warnings
This completes 50% of the telemetry roadmap (6/12 tasks). Queue wait
time metrics enable identifying whether performance issues are due to
slow processing or mailbox congestion.
Progress: 6/12 tasks completed (50%)
0 commit comments