incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Feature][Webhooks] Calculate Incident Age for Incidents send via Webhooks

Open Audefleda opened this issue 1 year ago • 2 comments

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

Audefleda avatar Sep 17 '24 13:09 Audefleda

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_minutes is set: use the value
  • if lead_time_minutes is not set:
    • if created_date and resolution_date both are valid timestamp:
      • when resolution_date >= created_date, then set lead_time_minutes with resolution_date - created_date
      • else, not set
    • else, not set

Startrekzky avatar Sep 18 '24 13:09 Startrekzky

Hi @Startrekzky , that sounds cool!

Audefleda avatar Sep 18 '24 14:09 Audefleda

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.

github-actions[bot] avatar Nov 18 '24 00:11 github-actions[bot]

Hi @Startrekzky, are you still planning to fix this issue?

Audefleda avatar Nov 24 '24 09:11 Audefleda

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_time data in your DevLake database directly.
  • Adjust your webhook's payload to post the measured issue_lead_time to DevLake.

Feel free to reopen the issue if you still have questions.

Startrekzky avatar Nov 27 '24 11:11 Startrekzky