Introducing Custom Defaults for Flag Templates featured image

At LaunchDarkly, we serve over 20 trillion flags per day, or over 231,481 per second. That’s a lot of users creating flags, so we try to make it as intuitive as possible for you to create flags that fit your needs, quickly. That’s why we recently introduced an improved experience for creating flags, as well as a way to define custom defaults for flag templates. Here’s how it works.

Custom defaults for flag templates

In November, we released some new flag templates to help shortcut the flag creation process. If you’ve created a flag since then, you’re likely familiar with the different kinds of flag templates available to create: 

  • Custom: A flag that you can configure exactly how you wish.
  • Release: A temporary flag that initially serves false to all targets, then progressively rolls out to 100%.
  • Kill switch: These flags are permanent safety mechanisms that you can use to turn off non-core functionality or third-party tools in an emergency.
  • Experiment: A flag that you can use to test a hypothesis and improve on your findings.
  • Migration: A temporary flag used to migrate data or systems while keeping your application available.

Image caption: Our new flag creation experience

Setting custom defaults

Now, you can set custom flag defaults for each of those flag templates in the flag settings page for a project. This ensures that each time you create a new flag, your selected template is configured to your liking. You can preconfigure fields like: 

  • Whether a flag is temporary or permanent - Temporary flags are often used for safety when making changes, while permanent flags are for situations where different audiences should have different experiences or for operational control.
  • Boolean default variations - A flag's default values are the values that are served when targeting is on or off, unless you specify otherwise. For example, a boolean flag could have true set as its default rule when on and false set as its default off variation.
  • Tags - Tags are useful in the following ways:
    -Categorizing: You can add the same tag to different kinds of resources. This lets you easily understand which resources are associated with which projects or teams.
    -Filtering: You can filter the flags list, environments list, and projects list by tag.
    -Permissions: You can allow or deny account members access to resources with specific tags. To learn how to use tags with custom role policies, read Using tags.

Image caption: You can now configure flag templates to promote best practices within a project

Here are the customizable default fields for each flag template: 

Custom

  • Temporary/permanent
  • Boolean default variations and labels
  • Tags

Kill switch

  • Temporary/permanent
  • Boolean default variations and labels
  • Tags

Release

  • Temporary/permanent
  • Boolean default variations and labels
  • Tags

Migration and experiment

  • Tags

Note: Client-side SDK settings are once again a global configuration that can be applied to all flags in a project by default. 

To learn more about creating flags and customizing defaults for flag templates, read our documentation here.

Like what you read?
Get a demo
Related Content

More about Product Updates

March 6, 2024