diff --git a/website/docs/zombie-flags.mdx b/website/docs/zombie-flags.mdx new file mode 100644 index 000000000..9773e7be9 --- /dev/null +++ b/website/docs/zombie-flags.mdx @@ -0,0 +1,100 @@ +--- +id: zombie-flags +title: Zombie Flags +description: This page explains how to identify and manage Zombie Flags in ConfigCat through the dashboard, email reports, or the Zombie Flags API. +--- + +Zombie flags (stale 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 the following: +- **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](https://app.configcat.com/product/zombie-flags). +- Using the [Zombie Flags Email Report](https://app.configcat.com/my-account/zombie-flags-report). +- Via the [Zombie Flags API](https://api.configcat.com/docs/index.html#tag/Zombie-(stale)-flags). + +### Using the Dashboard + +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: + +- **Inactivity**: How long the flag was inactive. +- **Feature flag scope**: Choose between all feature flags or only those you are watching. +- **Included environments**: The ConfigCat [environment(s)](https://configcat.com/docs/main-concepts/#environment) to include in the analysis. +- **Ignored flags based on tags**: Exclude flags based on assigned 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**: Start typing to filter the list automatically. + +The Zombie Flags page in the ConfigCat dashboard + +By default, the Zombie Flags page will filter the zombie flags based on the filters set in the **My Zombie Flags Report** page. + +:::info +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. +::: + +### Using the Zombie Flags Report Email + +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 the configured timeframe. + +You can customize the report to include only the flags you want to track, using filters similar to those available in the dashboard. + +#### How to Set Up the Zombie Feature Flags Report + +1. Log in to the [ConfigCat dashboard](https://app.configcat.com/my-account/zombie-flags-report). +2. Click the Organization name in the top-left corner. +3. Select **My Zombie Flags Report** from the dropdown menu. + +Navigating to My Zombie Flags Report + +#### The My Zombie Flags Report Page + +The email report can be customized as follows: + +- **Receive report via email:** Turn on email notifications and set the frequency (daily, weekly, monthly). +- **Criteria:** Define how long a flag must be inactive before it's marked as stale. +- **Scope:** Include all flags or only watched ones. +- **Environment:** Choose the ConfigCat [environment(s)](https://configcat.com/docs/main-concepts/#environment) you want to analyze. +- **Tags:** Exclude specific flags based on 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 + +Here's a preview of what the Zombie Flags report email looks like: + +Zombie Flags Report Email + +### Using the Zombie Flags API + +The [Zombie Flags API](https://api.configcat.com/docs/index.html#tag/Zombie-(stale)-flags) allows programmatic access to zombie flag data. This is useful for integrating flag cleanup processes into your CI/CD workflows or internal tooling. + +You can use tools like Postman to retrieve zombie flag data via the API for testing or integration. Here's a preview of what it looks like in Postman: + +Using the Zombie Flags API in Postman + +## Other Tools for Identifying Unused Feature Flags + +In addition to the methods mentioned, ConfigCat also 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. +- [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. +- [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. diff --git a/website/sidebars.ts b/website/sidebars.ts index b2a2d9a66..9cbd14b25 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 6123ac29f..fae04569d 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -56,6 +56,7 @@ const features = [ url: 'advanced/migration-from-launchdarkly', title: 'Migration from LaunchDarkly', }, + { url: 'zombie-flags', title: 'Zombie Flags' }, // { url: 'advanced/config-v2-migration-guide', title: 'Config V2 Migration Guide' }, ], }, 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 000000000..f2a33691a 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 000000000..71b08d3fe 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 000000000..ced03f663 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/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 000000000..15c1045b2 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/using-the-zombie-flags-api-in-postman_192dpi.png b/website/static/assets/guide/my-zombie-flags-report/using-the-zombie-flags-api-in-postman_192dpi.png new file mode 100644 index 000000000..d03716104 Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/using-the-zombie-flags-api-in-postman_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 000000000..112c6f4de Binary files /dev/null and b/website/static/assets/guide/my-zombie-flags-report/zombie-flags-report-email_192dpi.png differ diff --git a/website/versioned_docs/version-V1/zombie-flags.mdx b/website/versioned_docs/version-V1/zombie-flags.mdx new file mode 100644 index 000000000..9773e7be9 --- /dev/null +++ b/website/versioned_docs/version-V1/zombie-flags.mdx @@ -0,0 +1,100 @@ +--- +id: zombie-flags +title: Zombie Flags +description: This page explains how to identify and manage Zombie Flags in ConfigCat through the dashboard, email reports, or the Zombie Flags API. +--- + +Zombie flags (stale 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 the following: +- **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](https://app.configcat.com/product/zombie-flags). +- Using the [Zombie Flags Email Report](https://app.configcat.com/my-account/zombie-flags-report). +- Via the [Zombie Flags API](https://api.configcat.com/docs/index.html#tag/Zombie-(stale)-flags). + +### Using the Dashboard + +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: + +- **Inactivity**: How long the flag was inactive. +- **Feature flag scope**: Choose between all feature flags or only those you are watching. +- **Included environments**: The ConfigCat [environment(s)](https://configcat.com/docs/main-concepts/#environment) to include in the analysis. +- **Ignored flags based on tags**: Exclude flags based on assigned 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**: Start typing to filter the list automatically. + +The Zombie Flags page in the ConfigCat dashboard + +By default, the Zombie Flags page will filter the zombie flags based on the filters set in the **My Zombie Flags Report** page. + +:::info +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. +::: + +### Using the Zombie Flags Report Email + +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 the configured timeframe. + +You can customize the report to include only the flags you want to track, using filters similar to those available in the dashboard. + +#### How to Set Up the Zombie Feature Flags Report + +1. Log in to the [ConfigCat dashboard](https://app.configcat.com/my-account/zombie-flags-report). +2. Click the Organization name in the top-left corner. +3. Select **My Zombie Flags Report** from the dropdown menu. + +Navigating to My Zombie Flags Report + +#### The My Zombie Flags Report Page + +The email report can be customized as follows: + +- **Receive report via email:** Turn on email notifications and set the frequency (daily, weekly, monthly). +- **Criteria:** Define how long a flag must be inactive before it's marked as stale. +- **Scope:** Include all flags or only watched ones. +- **Environment:** Choose the ConfigCat [environment(s)](https://configcat.com/docs/main-concepts/#environment) you want to analyze. +- **Tags:** Exclude specific flags based on 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 + +Here's a preview of what the Zombie Flags report email looks like: + +Zombie Flags Report Email + +### Using the Zombie Flags API + +The [Zombie Flags API](https://api.configcat.com/docs/index.html#tag/Zombie-(stale)-flags) allows programmatic access to zombie flag data. This is useful for integrating flag cleanup processes into your CI/CD workflows or internal tooling. + +You can use tools like Postman to retrieve zombie flag data via the API for testing or integration. Here's a preview of what it looks like in Postman: + +Using the Zombie Flags API in Postman + +## Other Tools for Identifying Unused Feature Flags + +In addition to the methods mentioned, ConfigCat also 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. +- [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. +- [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. diff --git a/website/versioned_sidebars/version-V1-sidebars.json b/website/versioned_sidebars/version-V1-sidebars.json index 2e100747c..e16b489a0 100644 --- a/website/versioned_sidebars/version-V1-sidebars.json +++ b/website/versioned_sidebars/version-V1-sidebars.json @@ -157,7 +157,8 @@ "label": "Monitoring" } ] - } + }, + "zombie-flags" ] }, {