Manage feature flag technical debt
Your feature flag dashboard can help in managing technical debt in your codebase and proactively cleanup obsolete or stale flags.
Flag creation
When creating a new flag, you can define whether it’s a temporary or permanent 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
Your dashboard features a summary of total active flags, running Experiments, and stale/permanent flag counts for your Production environment (only).
You also have two columns in the dashboard regarding flag status:
- Last Evaluation: This column displays the last time the feature flag in your code was referenced (for example, 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 its most recent evaluation and the last time it was edited or toggled in Kameleoon, a flag will be categorized into one of four possible statuses depending on whether it's 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 status 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 status is a clear sign that the flag may be outdated and no longer necessary.
- Permanent: The flag is permanent and exempt from staleness checks.
Changing flag type
You can change a feature flag's type 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.
It’s useful to consider your short and long-term goals and ensure that flag types reflect them. This consideration keeps dashboard features effective for cleanup. If you’re working in a team, ensure everyone involved is aware of the rationale and importance of keeping track of technical debt in your codebase and in the Kameleoon app.