diff --git a/website/docs/zombie-flags.mdx b/website/docs/zombie-flags.mdx new file mode 100644 index 00000000..249f411d --- /dev/null +++ b/website/docs/zombie-flags.mdx @@ -0,0 +1,111 @@ +--- +id: zombie-flags +title: Zombie Flags +description: This page explains how to identify and manage Zombie Flags in ConfigCat—feature flags that haven't been toggled in a while—using the dashboard, email reports, or the API. +--- + +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. + +Common scenarios where zombie flags appear: + +- A temporary feature becomes permanent, but its flag is never removed. +- A flag was introduced for a one-time rollout or experiment that's now complete. +- A decision was made to always keep a feature on or off, making the flag redundant. +- The flag hasn't been toggled or referenced for an extended period. + +## Why Removing Zombie Flags Matters + +Leaving stale flags in your code can lead to: +- **Increased complexity:** Unused flags clutter code and reduce maintainability. +- **Unexpected behavior:** Outdated flags might trigger legacy logic unintentionally. +- **Longer onboarding and reviews:** Developers waste time reviewing obsolete logic. +- **Performance degradation:** In large-scale systems, excess flags can slow down operations. + +## Managing Zombie Flags in ConfigCat + +There are three ways to access and manage Zombie flags in ConfigCat: + +- Through the Dashboard +- Using the Zombie Flags Email Report +- Via the Zombie Flags API + +### Using the Dashboard + +Using the [Dashboard](https://app.configcat.com) is the quickest way to view your zombie flags. Here's how to access the Zombie flags page: + +1. In your [organization overview page](https://app.configcat.com/organization), select your product. +2. Select the Zombie flags tab from the product menu at the top of the page. + +Navigating to Zombie Flags in the ConfigCat dashboard + +The Zombie flags page will shows all the stale flags in a table for the selected product. +You can filter the flags by: + +- **Inactivity**: How long the flag was inactive for. +- **Feature flag scope**: All flags or only ones that are watched. +- **Included environments**: The ConfigCat [environment](https://configcat.com/docs/main-concepts/#environment) for which you want to analyze flags. +- **Ignored flags based on tags**: The flags to exclude based on their tags. +- **Stale in all/any selected environments**: Choose whether to include flags that are stale in all or any of the selected environments. +- **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. + +Navigating to Zombie Flags in the ConfigCat dashboard + +By default, the Zombie flags page will filter your zombie flags based on the settings you set in the **My Zombie Flags Report** page (more on this soon). + +:::tip +If you have the [Code references](https://configcat.com/docs/advanced/code-references/overview/) feature enabled, you can also see where the flags are referenced in your code. This is useful for identifying where the flags are used and if they can be removed. +::: + +### Using the Zombie Flags Report + +My Zombie Flags Report scans your ConfigCat environments and identifies feature flags that haven't been updated or toggled within a specified timeframe. It highlights flags that are likely obsolete but still present in your source code or workflows. + +The difference between the Zombie flags report and the dashboard is that the report compiles and emails a list of all the stale feature flags in your product and sends to you. + +You could customize the report to include only the flags you want to track, similar to filtering in the dashboard. + +#### How to Set Up Zombie Feature Flags Report + +1. Log in to your [ConfigCat dashboard](https://app.configcat.com/my-account/zombie-flags-report). +2. Click your Organization name in the top-right corner. +3. Select **My Zombie Flags Report** from the dropdown menu. + +Navigating to My Zombie Flags Report + +#### Exploring the My Zombie Flags Report Page + +On the My Zombie Flags Report page, you can customize the report as follows: + +- **Receive Report via Email:** Toggle this option to enable the email reports and specify how often you'd like to receive the report (e.g., daily, weekly or monthly). + +- **Criteria:** Define how long a flag must be inactive before it's marked as stale. + +- **Scope:** Choose to include all feature flags or only the ones you're watching. + - **Environment:** Select the ConfigCat [environment](https://configcat.com/docs/main-concepts/#environment) for which you want to analyze flags. + - **Tags:** Select the flags you want to ignore in the report based on their tags. + - **Stale in all/any selected environments:** Choose whether to include flags that are stale in all or any of the selected environments. + +My Zombie Flags Report page in the dashboard + +#### Sample Email Report + +Once your preferences are set, ConfigCat will email you a Zombie Flags Report. Here's a preview of what that report might look like: + +{/* TODO: This would need to be updated */} +{/* Zombie Flags Report Email */} + +### Using the Zombie Flags API + +The Zombie Flags API allows you to programmatically access and manage your zombie flags. This is useful for teams that want to automate the process of identifying and removing stale feature flags. + +You can learn more about tye Zombie Flags API in the [ConfigCat API documentation](https://api.configcat.com/docs/index.html#tag/Zombie-(stale)-flags). + +{/* TODO: May need a screenshot here of how it works in postman */} + +## Other Tools for Identifying Unused Feature Flags + +In addition to the My Zombie Flags Report, ConfigCat provides several tools to help you detect and clean up unused feature flags: + +- [Scan & Upload Code References](https://configcat.com/docs/advanced/code-references/overview): Track where feature flags appear in your code. +- [The ConfigCat CLI](https://configcat.com/docs/advanced/cli): Detect flags still in your code that no longer exist in the ConfigCat Dashboard. +- [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. \ No newline at end of file diff --git a/website/sidebars.ts b/website/sidebars.ts index b2a2d9a6..9cbd14b2 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -162,6 +162,7 @@ const sidebars: SidebarsConfig = { }, ], }, + 'zombie-flags', { label: 'Migration from LaunchDarkly', type: 'category', diff --git a/website/src/pages/index.js b/website/src/pages/index.js index 6123ac29..92b54f71 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -18,6 +18,7 @@ const features = [ { url: 'network-traffic', title: 'Network Traffic' }, { url: 'purchase', title: 'Plans, Purchase & Billing' }, { url: 'organization', title: 'Organization & Roles' }, + { url: 'zombie-flags', title: 'Zombie Flags' }, { url: 'news', title: 'News & Product Updates' }, { url: 'faq', title: 'FAQ' }, { url: 'glossary', title: 'Glossary' }, diff --git a/website/static/assets/guide/my-zombie-flags-report/my-zombie-flags-report-page-in-the-dashboard_192dpi.png b/website/static/assets/guide/my-zombie-flags-report/my-zombie-flags-report-page-in-the-dashboard_192dpi.png new file mode 100644 index 00000000..e6fc53e0 Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/my-zombie-flags-report-page-in-the-dashboard_192dpi.png differ diff --git a/website/static/assets/guide/my-zombie-flags-report/my-zombie-flags-report_192dpi.png b/website/static/assets/guide/my-zombie-flags-report/my-zombie-flags-report_192dpi.png new file mode 100644 index 00000000..71b08d3f Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/my-zombie-flags-report_192dpi.png differ diff --git a/website/static/assets/guide/my-zombie-flags-report/navigating-to-my-zombie-flags-report_192dpi.png b/website/static/assets/guide/my-zombie-flags-report/navigating-to-my-zombie-flags-report_192dpi.png new file mode 100644 index 00000000..ced03f66 Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/navigating-to-my-zombie-flags-report_192dpi.png differ diff --git a/website/static/assets/guide/my-zombie-flags-report/navigating-to-zombie-flags-in-the-dashboard_192dpi.png b/website/static/assets/guide/my-zombie-flags-report/navigating-to-zombie-flags-in-the-dashboard_192dpi.png new file mode 100644 index 00000000..2a371aab Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/navigating-to-zombie-flags-in-the-dashboard_192dpi.png differ diff --git a/website/static/assets/guide/my-zombie-flags-report/the-zombie-flags-page-in-the-dashboard_192dpi.png b/website/static/assets/guide/my-zombie-flags-report/the-zombie-flags-page-in-the-dashboard_192dpi.png new file mode 100644 index 00000000..ad0da83e Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/the-zombie-flags-page-in-the-dashboard_192dpi.png differ diff --git a/website/static/assets/guide/my-zombie-flags-report/zombie-flags-report-email_192dpi.png b/website/static/assets/guide/my-zombie-flags-report/zombie-flags-report-email_192dpi.png new file mode 100644 index 00000000..d66d1616 Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/zombie-flags-report-email_192dpi.png differ