[Feature][Webhooks] Calculate Incident Age for Incidents send via Webhooks
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Use case
As a Dora Metrics user, I would like to have the Incident Age calculated for incidents, that are send via the Webhooks interface.
Description
Currently it seems, that the incident age is not calculated for Incidents provided via webhooks. At least the "lead_time_minutes" field remains 0, although created_date and resolution_date are properly filled. The documentation, at least indicates, that this is only calculated for Jira and Github issues.
Related issues
No response
Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hi @Audefleda , we've considered this before, but we're not sure if anyone needs this. What do you think about the following logic:
- if
lead_time_minutesis set: use the value - if
lead_time_minutesis not set:- if
created_dateandresolution_dateboth are valid timestamp:- when
resolution_date>=created_date, then setlead_time_minuteswithresolution_date-created_date - else, not set
- when
- else, not set
- if
Hi @Startrekzky , that sounds cool!
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
Hi @Startrekzky, are you still planning to fix this issue?
Hi @Audefleda , we are not going to do do this in the short term since it's not on our critical path. Sorry about that.
As a workaround, you could do:
- Fix the existing webhook data: Update the
issue_lead_timedata in your DevLake database directly. - Adjust your webhook's payload to post the measured
issue_lead_timeto DevLake.
Feel free to reopen the issue if you still have questions.