Skip to content

The Incident Loop

Lionel Serrao edited this page Nov 29, 2026 · 1 revision

The Incident Loop

What happens from "something is broken" to "back to normal", and what you see at each step. The demo's names are used throughout: flag new_checkout, environment Production.

sequenceDiagram
    autonumber
    participant M as Monitoring<br/>(Prometheus / Grafana)
    participant F as Flagsmith
    participant R as Flag Responder<br/>(VS Code)
    participant You
    M->>F: Webhook: new_checkout unhealthy in Production
    R->>F: Poll Feature Health events (every pollSeconds)
    F-->>R: New UNHEALTHY event
    R->>You: Red status bar, 🔥 line above the flag check, notification
    You->>R: Click the 🔥 line
    R->>F: Who still gets the flag? (default, overrides, A/B test)
    R->>You: Dialog: "Still on for segment internal_staff and A/B test …"
    You->>R: Turn off for everyone in Production
    R->>F: Turn off overrides, take the A/B test's traffic, pause the test
    R->>F: Read the flag back
    R->>You: "Flagsmith confirms nobody in Production gets new_checkout now"
    M->>F: Webhook: healthy again
    F-->>R: New HEALTHY event
    R->>You: "Kill switch turned this off — turn back on for …"
    You->>R: Turn back on in Production
    R->>F: Turn on exactly those, give the test its traffic back, resume it
Loading

1. The alert lands on the code

Monitoring sends an alert to Flagsmith's Feature Health webhook. On its next check (every flaglens.pollSeconds), Flag Responder shows it in three places:

  • a red status bar: new_checkout unhealthy in Production;
  • a 🔥 line above every check of that flag: Unhealthy in Production: <reason> — turn off in Production;
  • a notification with the reason, and how long before the alert the flag last changed ("was it the flag change?").

An alert sent without an environment (a common mistake in custom Prometheus rules) counts for every environment where the flag is still on.

2. Ask who is still on the broken code

Click the 🔥 line. The dialog asks Flagsmith and lists who still gets the flag:

Still on for segment internal_staff and A/B test "One-page checkout". The default is already off; the overrides alone keep it on.

To check one person, hover the flag and click Check a user. Flagsmith's own evaluation answers for every environment: on or off, which value, and why.

3. Turn it off for everyone

Turn off for everyone in Production turns off, in one step:

  • the environment default, if it's on;
  • every segment override that's on;
  • every identity override that's on;
  • any A/B test serving the flag: its traffic is taken away and the test is paused, so the broken period stays out of its results.

Then Flag Responder reads the flag back from Flagsmith. If anyone still gets it, it says so plainly and offers Try again. Details and failure handling are in How the Kill Switch Works.

4. Tell the team

Copy incident summary puts a ready-to-paste summary on the clipboard: what broke, when, what was turned off, and links to the code.

5. Back to how it was

When monitoring reports the flag healthy again, a new line appears above the check:

Kill switch turned this off in Production — turn back on for segment internal_staff and A/B test "One-page checkout"

Click it and confirm. Flag Responder turns back on exactly what it turned off. Anything someone already turned back on is left alone, and so is everything it never touched. The A/B test gets its traffic back and resumes, unless someone completed it in the meantime; in that case it says so.

Keep it off forgets the restore instead.

Try it

Run the steps in Getting Started §5, or play with the same scenario in the interactive explainer.

Clone this wiki locally