Overview
This release addresses a critical stability issue in the Inspector component where message timestamps outside the configured time window could trigger an IndexError, halting data inspection and analysis.
Bug Fix: Out-of-Bounds Index
Issue:
When messages arrived with timestamps earlier or later than the expected [begin_timestamp, end_timestamp] range, the internal _count_errors() method attempted to write counts beyond the size of the counts array, resulting in:
IndexError: index XXXX is out of bounds for axis 0 with size YYYY
Resolution:
- Added bounds checking and filtering of invalid time indices.
- Safely ignore timestamps that fall outside the configured time range.
- Added clear warnings in logs when such messages are skipped.
- Introduced new unit tests verifying correct counting and stability.
Result:
The Inspector now handles out-of-range messages gracefully without crashing, ensuring uninterrupted operation and accurate in-range metric aggregation.
Additional Improvements
- Minor logging improvements for debugging time range and timestamp issues.
- Enhanced test coverage for
_count_errors()edge cases (empty batches, duplicate timestamps, out-of-range messages).
Verification
A new test (test_count_errors_valid_and_out_of_range) confirms that:
- Counts are correctly computed for valid timestamps.
- Out-of-range messages are ignored safely.
- No
IndexErroror unexpected array resizing occurs.
⚙️ Upgrade Notes
No configuration changes are required.
It is recommended to upgrade to this version if your Inspector processes messages that may arrive late or have timestamp drift.