Your feature flag dashboard can help in managing technical debt in your codebase and proactively cleanup obsolete or stale flags.
When creating a new flag, you can define whether it’s a temporary or permanent type of flag. This distinction is crucial for managing technical debt effectively to keep track of their health and status moving forward:
- Temporary Flags: Used to control features that have a short-term purpose or are part of an ongoing experiment. They are ideal for situations where you need to roll out a new feature with safeguards or precisely schedule your release. Temporary flags are not intended to be part of your codebase in the long run and are thus regularly checked for staleness to ensure they are actively managed.
- Permanent Flags: Permanent flags are intended for long-term use and are meant to be a permanent part of your codebase. They are ideal for features that are core to your application’s functionality. Unlike temporary flags, permanent flags are exempt from staleness checks, and Kameleoon will not highlight them for removal.
Dashboard utilities for flag cleanup
Note: Your dashboard features a summary of total active flags, running Experiments as well as stale/permanent flag counts for your Production environment (only).
You also have two columns in the dashboard to assist you with better visibility for flag status:
- Last Evaluation: This column displays the last time the feature flag in your code was referenced i.e the most recent instance of an end user being evaluated by the flag in your application code to determine which variation to expose the user to, giving you a clear indication of when the flag was last in active use.
- Status: Based on a flag’s last evaluation and the last time it was edited or toggled inside the Kameleoon app, it will be categorized into one of four possible statuses depending on whether its permanent or temporary:
- Healthy: The temporary flag is new or has been edited or evaluated in the last 15 days, indicating active usage.
- Stale: The temporary flag has not been edited or evaluated in code for more than 15 days. This may indicate that the rollout or experiment has reached a stable point and the flag is no longer being used, or that the flag has not been referenced in the code for a while.
- Outdated: The temporary flag has not been edited or evaluated in code for more than 30 days. This is a clear sign that the flag may be outdated and no longer needed.
- Permanent: The flag is permanent and exempt from staleness checks.
You can also use filters on the right side of your screen or the ‘Stale flags’ shortcut at the top of your dashboard to quickly access unhealthy flags to take timely action on aging flags and keep your code (and Kameleoon dashboard) clean, efficient and up-to-date.
Changing flag type
You can change the type of a feature flag from temporary to permanent, and vice versa. As features and projects evolve, the nature of certain features may change. Converting a flag’s type ensures it aligns with the current development trajectory.
Navigate to the secondary actions menu for any flag from the dashboard, and use the Mark as temporary(/permanent) button to change the flag type.
Every now and then, it’s useful to consider your short and long-term goals and that flag types reflect that. This ensures that the dashboard features are effective in helping with the cleanup. If you’re working in a team, make sure everyone involved is aware of the rationale and importance behind keeping track of technical debt in your codebase and on the Kameleoon app.