No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Kill switch flags

Read time: 2 minutes
Last edited: May 01, 2024

Overview

This topic explains how you can use kill switch or circuit breaker flags to shut off functionality. These flags are permanent safety mechanisms that you can use to turn off non-core functionality or third-party tools in an emergency.

Understanding kill switch flags

Kill switch flags, sometimes called circuit breaker flags, are permanent boolean flags with two variations: "Enabled" (true) and "Disabled" (false).

Kill switch flags are operational flags that control or change how your app or service operates. Often, these changes happen in response to unplanned events, such as traffic spikes or third-party service failures. You can use these flags to quickly turn off functionality when needed. You can also integrate these flags with observability or application performance management (APM) tools to automate flag shut off. To learn more, read Observability tools.

To create a kill switch flag:

  1. Navigate to the flags list.
  2. Click Create flag. The "Create new flag" page appears.
  3. Enter a unique, human-readable Name.
  4. (Optional) Update the flag Key. You'll use this key to reference the flag in your code. A suggested key auto-populates from the name you enter, but you can customize it if you wish.
  5. (Optional) Enter a Description of the flag. A brief, human-readable description helps your account members understand what the flag is for.
  6. (Optional) Update the Maintainer for the flag.
  7. (Optional) Check the Include flag in this project's release pipeline box. To learn more, read Release pipelines.
  8. (Optional) Choose any Metrics to monitor in the Metrics section. To learn more, read Metrics.
  9. Choose the Kill switch flag template in the Configuration section:
The "Configuration" section of the "Create new flag" page.
The "Configuration" section of the "Create new flag" page.
  1. Choose Yes or No to indicate whether this flag is temporary. Kill switch flags are usually permanent.
  2. Select the Boolean flag type.
  3. (Optional) In the "Variations" section, update variations as needed.
  4. (Optional) Update the default variations.
  5. Choose one or more tags from the Tags menu.
  6. Check the SDKs using Mobile Key and/or SDKs using client-side ID boxes to indicate which client-side SDKs you will use to evaluate this flag. If you are using a server-side SDK, leave these boxes unchecked.
  7. Click Create flag.

To learn more, read Creating new flags.

Because kill switch or circuit breaker flags are used to shut off functionality or third-party tools completely, they typically do not use complex targeting rules. Instead, they serve "Enabled" by default when targeting is on, and "Disabled" when targeting is off. To learn more about targeting, read Target with flags.