middleware icon indicating copy to clipboard operation
middleware copied to clipboard

Webhook/endpoint to create "incidents" in the system on-demand

Open jayantbh opened this issue 1 year ago • 7 comments

Why do we need this ?

Currently the system relies on reverted PRs for CFR/MTTR data, only. With support for webhooks, we might be able to link a variety of third party incident management solutions to Middleware for better Dora metrics reporting.

Should be straight-forward enough.

jayantbh avatar Oct 01 '24 19:10 jayantbh

@jayantbh could please assign this issue to me, i would like to build this feature.

xyfer17 avatar Oct 05 '24 15:10 xyfer17

@jayantbh I was researching the webhook implementation and just need a quick clarification: what specific fields/parameters should we expect from third-party systems for each incident? (I'm thinking incident ID, severity, description, detected timestamp).

divyanshu-dj avatar Oct 06 '24 07:10 divyanshu-dj

https://github.com/middlewarehq/middleware/issues/562#issuecomment-2397665815

Please check out the guidelines in this issue. These two issues are very similar in implementation and would largely use the similar services and APIs that one of these issue end up implementing. So before we begin the implementation it is better to have the approach well discussed and documented here. This is a rather challenging and time taking task.

As for the what request body we want from the user, you can read through the incident service to get a better understanding of our system.

adnanhashmi09 avatar Oct 07 '24 19:10 adnanhashmi09

@xyfer17 @divyanshu-dj ^ the linked comment will offer much needed context.

jayantbh avatar Oct 08 '24 11:10 jayantbh

@jayantbh @adnanhashmi09 Why use webhooks and not through rest api provided by incident management solutions?

Kamlesh72 avatar Feb 06 '25 16:02 Kamlesh72

A simple set of CRUD api endpoints for incidents would be highly beneficial for creating integrations into middleware. Linear B offers something similar: https://docs.linearb.io/api-incidents/ Many similarly for tracking deployments.

adamlyka avatar Feb 07 '25 00:02 adamlyka

We plan to introduce webhooks first, allowing users to integrate their incident providers without requiring us to support each integration individually. Users can send data to us via the webhook—the same data we would otherwise fetch from the incident providers' REST APIs.

adnanhashmi09 avatar Feb 07 '25 04:02 adnanhashmi09