Flag health
Engineering insights is not available in LaunchDarkly's European Union (EU) instance
To learn more, read LaunchDarkly in the European Union (EU).Overview
This topic explains how to use the flag health page in engineering insights.
LaunchDarkly uses stale flags as an indicator of flag health. A flag is stale when it meets all of these conditions:
- The flag is temporary.
- The flag is not deleted or archived.
- The flag was created at least 30 days ago.
- The flag has had a status of “inactive” or “launched” for at least 7 days.
Flag health summary
The flag health summary includes:
- Percentage of stale flags
- Total number of stale flags
- Total number of temporary flags
Use the selection menus to narrow your view to a specific project, environment, or application.
Flag statuses
The flag status chart shows an aggregate view of your flags in your selected environment and project.
Flags can have 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 received different variations of the flag in the last seven days, or
- you changed the flag’s configuration in the last seven days, or
- the flag is toggled off.
- Launched: The flag is being evaluated, and:
- all context instances received the same variation in the last seven days, and
- you have not changed the flag’s configuration in the last seven days, and
- the flag is toggled on.
- Inactive: The flag has not been evaluated for at least seven days.
Launched status is based on evaluations
In engineering insights, the “launched” status is based only on evaluations. The counts shown here may differ slightly from the Flags list.
Using the stale Flags list
The stale Flags list shows flags in a selected environment that meet LaunchDarkly’s staleness criteria. Review these flags to decide whether to remove or archive them.
You can refine the list using search and filter options:
- Search by flag key.
- Filter by archive check status, maintainer, or tags.
- Sort by flag age.
- Compare environments to see the flag’s state across environments and confirm that archiving will not cause unintended consequences.
If you choose additional environments, LaunchDarkly applies the staleness criteria across those environments and updates the list. You can also view archive checks for each flag to confirm whether it is ready to archive.
Stale flags and archive checks
Stale flags and archive checks are related but different. Stale flags are identified based on age and status. Archive checks confirm whether a stale flag can be safely removed from your codebase.
Description of checks
LaunchDarkly runs four archive checks to determine if a flag is ready to be archived or for code removal:
- Verify absence of code references:
- If you never used the flag or did 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 the flag from your code, this check passes with the explanation “Removed code references on [date]” and links to the extinction message. To learn more, read About extinction events.
- If you do not use code references, this check does not run.
- Verify the flag has not been requested: This check passes if the flag has not been requested in the last seven days.
- Verify only one variation is being served: This check passes if all environments are serving the same variation as the selected environment at the top of the page.
- Verify the flag is not a prerequisite: This check passes if the flag is not a prerequisite for any other flags.
To view more information about these checks, click Show archive checks.
When the archive checks are showing, you can view evaluation details by hovering over the Status field. A chart of flag evaluations appears.
If all checks pass, you can click Archive to begin the archive process.