Capture and display incident duration
Proposal
In Incident Tag MVC (&8741), we will be capturing specific timestamps in incidents. In the longer run, we will want to perform calculations based on these timestamps, so that we can begin tracking important incident metrics.
Once we have start/end time captured in the UI (which will happen as part of Incident Tag MVC (&8741)), we can capture and display incident duration.
Design
After we've re-purposed the incident highlight bar for incident timestamps, we can display the incident duration within it as follows:
Additional design details:
- We will only display the incident duration if an incident start and end time have been added as incident timestamps. If both have not been added, the duration will not display (including the
Duration:
label). - For the first iteration, duration will simply be the difference between the incident start and end time.
Implementation
-
expose duration ( timeline event w/ end time tag
-timeline event w/ start time tag
) on incident issues in graphql backend -
check into query performance of searching incidents by duration backend -
query graphql for incident duration & display frontend
Why not just calculate the duration on the frontend from the timeline event tags?
We'll need to expose duration via API for #360004. We should guarantee consistency in the attribute by establishing a single source of truth.
Likewise, if we need to store the duration in the DB to enable good query performance, we should do that with this issue.