Create a runbook when creating an alert

Problem to solve

As part of discussion in #208490 (comment 307268238), we decided to break down the work required to surface runbooks in alerts into smaller iterations. This issue focuses on creating and linking a runbook.

When users are creating an alert, they probably haven't written up their runbook yet. Chances are, it might even slip their mind. So, it should be as easy a possible to create that runbook.

Proposal

  • Add an additional button to the alert creation modal that will allow users to add the alert and create a runbook:

Create_alert_modal-1

  • Clicking that button will open a page in the project's wiki under the directory 'runbooks', titled with the alert definition.
  • The user will be directed to the new runbook straightaway, so they start editing the runbook as needed.

Design details

The table below shows how the new button would look in both the "add new" and "edit" versions of the alert modal. In addition, if a user adds a URL in the runbook URL field, the "add runbook" button should become disabled. The user should only be able to associate a single runbook with an alert.

Button in add alert modal Button in edit alert modal Runbook added, button disabled
Create_alert_modal Edit_alert_modal Disabled_button

Intended users

Full workflow that this issue will fit into:

  1. User clicks create alert
  2. User adds query and threshold for alert
  3. User clicks Save alert & create new runbook
  4. Alert saves, new window opens for User where a new runbook has been created and named with the title of the alert. Title is populated, description is blank
  5. User clicks edit to add steps to the runbook

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Sarah Waldner