Skip to content

Commit 3b0683c

Browse files
committed
Add: zombie flags document to v1 docs and v1 sidebar
1 parent 0999dce commit 3b0683c

File tree

2 files changed

+104
-1
lines changed

2 files changed

+104
-1
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
id: zombie-flags
3+
title: Zombie Flags
4+
description: This page explains how to identify and manage Zombie Flags in ConfigCat through the dashboard, email reports, or the Zombie Flags API.
5+
---
6+
7+
Zombie flags are feature flags that are no longer needed or actively used. They often remain in the codebase long after their purpose has been fulfilled. Removing these outdated flags can reduce technical debt, improve performance, and simplify your codebase.
8+
9+
Common scenarios where zombie flags appear:
10+
11+
- A temporary feature becomes permanent, but its flag is never removed.
12+
- A flag was introduced for a one-time rollout or experiment that's now complete.
13+
- A decision was made to always keep a feature on or off, making the flag redundant.
14+
- The flag hasn't been toggled or referenced for an extended period.
15+
16+
## Why Removing Zombie Flags Matters
17+
18+
Leaving stale flags in your code can lead to the following:
19+
- **Increased complexity:** Unused flags clutter code and reduce maintainability.
20+
- **Unexpected behavior:** Outdated flags might trigger legacy logic unintentionally.
21+
- **Longer onboarding and reviews:** Developers waste time reviewing obsolete logic.
22+
- **Performance degradation:** In large-scale systems, excess flags can slow down operations.
23+
24+
## Managing Zombie Flags in ConfigCat
25+
26+
There are three ways to access and manage Zombie flags in ConfigCat:
27+
28+
- Through the [Dashboard](https://app.configcat.com/product/zombie-flags).
29+
- Using the [Zombie Flags Email Report](https://app.configcat.com/my-account/zombie-flags-report).
30+
- Via the [Zombie Flags API](https://api.configcat.com/docs/index.html#tag/Zombie-(stale)-flags).
31+
32+
### Using the Dashboard
33+
34+
The [Zombie flags page](https://app.configcat.com/product/zombie-flags) shows all the stale flags in a table for the selected product based on the filters set:
35+
36+
- **Inactivity**: How long the flag was inactive for.
37+
- **Feature flag scope**: All flags or only ones that are watched.
38+
- **Included environments**: The ConfigCat [environment](https://configcat.com/docs/main-concepts/#environment) for which you want to analyze flags.
39+
- **Ignored flags based on tags**: The flags to exclude based on their tags.
40+
- **Stale in all/any selected environments**: Choose whether to include flags that are stale in all or any of the selected environments.
41+
- **Filter by config or feature flag name**: Type at least the first letter of the feature flag or config name to auto-filter the results.
42+
43+
<img alt="The Zombie Flags page in the ConfigCat dashboard" src="/docs/assets/guide/my-zombie-flags-report/the-zombie-flags-page-in-the-dashboard_192dpi.png" width="1366" height="768" decoding="async" loading="lazy" />
44+
45+
By default, the Zombie Flags page will filter the zombie flags based on the filters set in the **My Zombie Flags Report** page.
46+
47+
:::info
48+
If you have the [Code References](https://configcat.com/docs/advanced/code-references/overview/) feature enabled, you can also see where the flags are used in your code.
49+
:::
50+
51+
### Using the Zombie Flags Report Email
52+
53+
The Zombie Flags Report scans your ConfigCat dashboard and sends an email report of the feature flags that haven't been updated or toggled within a specified time frame.
54+
55+
You could customize the report to include only the flags you want to track, similar to filtering in the dashboard.
56+
57+
#### How to Set Up the Zombie Feature Flags Report
58+
59+
1. Log in to the [ConfigCat dashboard](https://app.configcat.com/my-account/zombie-flags-report).
60+
2. Click the Organization name in the top-right corner.
61+
3. Select **My Zombie Flags Report** from the dropdown menu.
62+
63+
<img alt="Navigating to My Zombie Flags Report" src="/docs/assets/guide/my-zombie-flags-report/navigating-to-my-zombie-flags-report_192dpi.png" width="1366" height="768" decoding="async" loading="lazy" />
64+
65+
#### The My Zombie Flags Report Page
66+
67+
The email report could be customized as follows:
68+
69+
- **Receive report via email:** Toggle this option to enable the email report, and specify how often you'd like to receive the report (e.g., daily, weekly, or monthly).
70+
71+
- **Criteria:** Define how long a flag must be inactive before it's marked as stale.
72+
73+
- **Scope:** Choose to include all feature flags or only the ones you're watching.
74+
- **Environment:** Select the ConfigCat [environment](https://configcat.com/docs/main-concepts/#environment) for which you want to analyze flags.
75+
- **Tags:** Select the flags you want to ignore in the report based on their tags.
76+
- **Stale in all/any selected environments:** Choose whether to include flags that are stale in all or any of the selected environments.
77+
78+
<img alt="My Zombie Flags Report page in the dashboard" src="/docs/assets/guide/my-zombie-flags-report/my-zombie-flags-report-page-in-the-dashboard_192dpi.png" width="1366" height="945" decoding="async" loading="lazy" />
79+
80+
#### Sample Email Report
81+
82+
Here's a preview of what the Zombie Flags report email looks like:
83+
84+
<img alt="Zombie Flags Report Email" src="/docs/assets/guide/my-zombie-flags-report/zombie-flags-report-email_192dpi.png" width="1366" height="768" decoding="async" loading="lazy" />
85+
86+
### Using the Zombie Flags API
87+
88+
The [Zombie Flags API](https://api.configcat.com/docs/index.html#tag/Zombie-(stale)-flags) allows you to access your zombie flags using an API endpoint programmatically.
89+
90+
Here's a preview of what it looks like in Postman:
91+
92+
<img alt="Using the Zombie Flags API in Postman" src="/docs/assets/guide/my-zombie-flags-report/using-the-zombie-flags-api-in-postman_192dpi.png" width="1366" height="768" decoding="async" loading="lazy" />
93+
94+
## Other Tools for Identifying Unused Feature Flags
95+
96+
In addition to the methods mentioned, ConfigCat also provides several tools to help you detect and clean up unused feature flags:
97+
98+
- [Scan & Upload Code References](https://configcat.com/docs/advanced/code-references/overview): Track where feature flags appear in your code.
99+
- [The ConfigCat CLI](https://configcat.com/docs/advanced/cli): Detect flags still in your code that no longer exist in the ConfigCat Dashboard.
100+
- [GitHub Action](https://configcat.com/docs/integrations/github/) and [CircleCI Orb](https://configcat.com/docs/integrations/circleci): Find feature flags in your code that you might want to remove.
101+
- [Bitrise Step](https://configcat.com/docs/integrations/bitrise/): Scan your source code for feature flag and setting usages and upload the found code references to ConfigCat.
102+
- [Bitbucket Pipe](https://configcat.com/docs/integrations/bitbucket/): Scan your source code for feature flag and setting usages and upload the found code references to ConfigCat.

website/versioned_sidebars/version-V1-sidebars.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@
157157
"label": "Monitoring"
158158
}
159159
]
160-
}
160+
},
161+
"zombie-flags"
161162
]
162163
},
163164
{

0 commit comments

Comments
 (0)