Technical debt

Tggl is the best way to monitor technical debt and remove old code quickly. Tggl leverages your data to automatically track the state of all your flags:

  • Letting you know when flags are safe to remove from your codebase
  • Alerting you when a flag is stuck in the middle of a release
  • Help you manage temporary and permanent flags

The lifecycle stages

A flag goes through several stages in its lifecycle, Tggl leverage monitoring data to automatically transition flags between these stages:

  • New: The flag was created less than 7 days ago and was never evaluated in your code
  • Legacy: The flag has not been evaluated in the last 7 days
  • Permanent: The flag is marked as permanent and has been evaluated in the last 7 days
  • Active: The flag has been evaluated in the last 7 days (and is not completed or stuck)
  • Completed: The flag has not been modified in the last 7 days and returns the same variation for every user
  • Stuck: The flag has not been modified in the last 7 days but still returns different variations for some user

You can see the state of your flags in the Flags tab of the dashboard. You can also hover a state to have more information about why this flag is in this particular state.

Flags status

The rollout lifecycle

Typically, a flag will go through the following lifecycle, from new to archived:

Rollout lifecycle

Tggl helps you automatically track the current stage of each flag and nudges you to take action when needed.

What action to take based on stage?

Each state has its own set of actions you should take to improve your codebase and reduce technical debt.

New

Since a New flag was recently created but has never been evaluated, it probably means that you should add it to your codebase to control the intended feature.

If after a week the flag has still not been evaluated, it will automatically transition to the Legacy state.

Legacy

Flags in the Legacy state have not been evaluated in the last 7 days. This means that the flag has probably been removed from the codebase and can be safely archived on Tggl.

Permanent

Tip

Flags in the Permanent stage do not require any action on your side! This is a healthy state to be in.

Flags in the Permanent state are actively being evaluated and are marked as permanent. You can mark any flag as permanent in the settings tab of the flag. This is useful for flags that are long lived, typically kill switches and remote config.

Even if a flag is marked as permanent, it will transition to the Legacy state if it stops being evaluated for 7 days.

Active

Tip

Flags in the Active stage do not require any action on your side! This is a healthy state to be in.

Flags in the Active state are actively being evaluated and serve different variations to different users. Typically, these flags are part of a release or an experiment.

If the flag does not change for 7 days, it will transition to the Stuck state.

Completed

When a feature is fully released, meaning that the same variation is served to all users for the past 7 days, the flag will be in the Completed stage. This is a good time to remove the flag from your codebase and remove the legacy code for the variations that are not served.

Flags should stay as little as possible in the completed stage because it means that you have dead code in your codebase. If you need to keep the flag for safety measures (kill switch), you should mark it as permanent.

Stuck

Flags in the Stuck stage return different variations for some users but have not been modified in the last 7 days. This is a sign that the flag is stuck in the middle of a release and should be investigated. You can either:

  • Complete the release by serving the feature to all users
  • Rollback the release by serving the old feature to all users
  • Mark the flag as permanent if it is a remote config