fix(incidents): compute resolution correctly in metric issue detector#112623
fix(incidents): compute resolution correctly in metric issue detector#112623
Conversation
Backend Test FailuresFailures on
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 518a1a6. Configure here.
saponifi3d
left a comment
There was a problem hiding this comment.
lgtm!
Random thought while looking at this PR; in the future we should also revisit the resolution a little to make sure the jitter is working as expected so we can clean up some saw-toothing on evaluations.
| aggregate=validated_data["aggregate"], | ||
| time_window=timedelta(seconds=validated_data["time_window"]), | ||
| resolution=timedelta(minutes=1), | ||
| resolution=validated_data.get("resolution", timedelta(minutes=1)), |
There was a problem hiding this comment.
👀 - should we do anything to see if the existing metric alerts have the correct resolutions?
There was a problem hiding this comment.
In theory, but by my count there are fewer than 87 potentially impacted cases so far in US (and probably far less than that), so I'm not entirely sure it's worth pursuing. This is more of a thing where we want to close the door before we let in the crowds.
| query_type=data_source.get("query_type", SnubaQuery.Type(snuba_query.type)), | ||
| dataset=data_source.get("dataset", Dataset(snuba_query.dataset)), |
…#112623) This updates the Detector implementation of metric alerts to scale resolution based on query frequency to manage snuba capacity the same way we do for AlertRules. We had to do a few type clean-ups in the process; primarily a switch to timedelta, as we've had a few bugs related to inconsistent interpretation of int durations. Fixes ISWF-2127.

This updates the Detector implementation of metric alerts to scale resolution based on query frequency to manage snuba capacity the same way we do for AlertRules.
We had to do a few type clean-ups in the process; primarily a switch to timedelta, as we've had a few bugs related to inconsistent interpretation of int durations.
Fixes ISWF-2127.