Determine smarter time range for metrics shown on alert detail page
Problem to solve
Metrics investigation often happens under pressure and when time is of the essence. For a chart to be useful, a responder needs to have context to when the problem occurred and how long it is been going on. Scrolling and adjusting a chart to find the data surrounding the incident can steal consume valuable minutes during a fire-fight. The alert often contains start and end times which can be used to intelligently render charts in issues to the more relevant time frame, saving the responder time and helping them to evaluate data faster.
User experience goal
User is able to quickly disseminate useful information from a metrics chart because it renders to a relevant time-frame automatically.
This issue comes out of discussion on #217768 (comment 354906998) - as a first pass for showing metrics on the alert detail page, we can stick with our current embed default behaviors, which are, to center the start-time on the graph and to show 30 mins before and after.
However, we may want to consider some smarter time range behaviors here. Some suggestions from @tristan.read on how we can do this:
- If end-time exists, It should show start-time to end-time + a small buffer before and after (30 mins?).
- If no end-time exists, it should show start-time to now.
- There should be a maximum time length in case an alert goes stale and is never resolved. Perhaps we go with 8 hours initially. We can gather usage data and iterate if required.
This work supports the direction of the Alert Management product category.