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

GIVE DOCS FEEDBACK

Flag health

Read time: 3 minutes
Last edited: Feb 10, 2024
This feature is for Early Access Program customers only

Engineering insights is only available to members of LaunchDarkly's Early Access Program (EAP).

Overview

This topic explains how to use the flag health page in engineering insights.

LaunchDarkly uses stale flags as an indicator of flag health. Stale flags are temporary flags older than 90 days that have a status of either "inactive" or "launched" within a given environment.

Understanding the flag health summary

The flag health summary includes:

  • Percentage of stale flags
  • Total number of stale flags
  • Total number of temporary flags
The flag health summary.
The flag health summary.

Use the selection menus to narrow your view to a specific LaunchDarkly project or environment, or one or more applications.

Using the flag status chart

The flag status chart provides an aggregate view of your flags in your selected environment and project.

Flags may be in one of the following statuses:

  • New: You created the flag fewer than seven days ago and it has never been evaluated.
  • Active: The flag is being evaluated, and either
    • different contexts have received different variations of the flag over the last seven days, or
    • you have made changes to the flag's configuration in the past seven days, or
    • the flag is toggled off.
  • Launched: The flag is being evaluated, and
    • all context instances have received one variation of the flag over the past seven days, and
    • you have made no changes to the flag's configuration in the past seven days, and
    • the flag is toggled on.
  • Inactive: The flag has not been evaluated for at least seven days.

For details on how these statuses are calculated, read Flag statuses.

Launched flag status is based on evaluations

In engineering insights, the "launched" flag status is solely based on evaluations, so the counts displayed here may differ slightly from the Feature flags list.

Group by flag status.
Group by flag status.

Using the stale flags list

The stale flags list shows information about flags in a selected environment that we recommend you remove.

You can refine this list into a different subset of flags using the search and filter options:

  • Search by flag key.
  • Filter by archive check status, flag maintainer, or tags.
  • Sort by flag age.
  • Use the Compare environments menu to compare the flag state across additional environments. This helps you verify that you can archive the flag without unintended consequences.
Comparing environments in the stale flags list.
Comparing environments in the stale flags list.

If you choose additional environments, LaunchDarkly performs the checks again and highlights stale flags.

Description of checks

LaunchDarkly runs four checks to determine if a flag is stale. They are:

  • Verify absence of code references:
    • If you have either never used the flag, or have not set up code references for the repository, this check passes with the explanation "Code references never detected."
    • If you use code references and have removed this flag from your code completely, this check passes with the explanation "Removed code references on [date]," and links to the extinction message. To learn more, read Understanding extinction events.
    • If you do not use code references, this check does not run.
  • Verify the flag has not been requested: If the flag has not been requested in the last seven days, this check passes.
  • Verify only one variation is being served: If all environments are serving the same variation as the selected environment at the top of the page, this check passes.
  • Verify the flag is not a prerequisite: If the flag is not a prerequisite of any other flags, this check passes.

To view additional information about these checks, click Show archive checks. Here's an example:

A flag in the Stale flags list, after clicking "Show archive checks."
A flag in the Stale flags list, after clicking "Show archive checks."

When the archive checks are showing, you can view additional information about flag evaluation by hovering over the "Status" field. A flag evaluations chart appears. Here's an example:

A flag evaluations chart, which appears when your cursor hovers over the "Status" field.
A flag evaluations chart, which appears when your cursor hovers over the "Status" field.

If all checks pass, you can click Archive to begin the archive process.