feat(core): optimize alert retrieval and add alert-based filtering#12
Conversation
This version introduces the 'expand_raised_alert_names' parameter in device list and get calls, enabling efficient retrieval of active alerts without separate telemetry queries.
Transition from manual telemetry-based alert fetching to SDK-level expansion to reduce API calls and improve performance. This change ensures 'active_alerts' is always a list in the FULL view for better consumer predictability, and introduces 'active_alerts_total' to allow monitoring alert status in BASIC views.
Allow filtering devices by the presence or absence of active alerts. This provides a more efficient way to identify devices requiring attention or to monitor healthy devices.
|
@copilot, can you review the changes? |
Reviewed the three commits. The changes look correct overall. A few observations:
Test cleanup — the two Performance — Nothing blocking. The approach is clean and correct. |
This PR optimizes how active alerts are retrieved from the Enapter API and introduces a new filtering capability to the search_devices tool. We transitioned from manual, telemetry-based alert fetching to using SDK-level expansion, significantly reducing API latency and complexity.