Skip to main content

Permanent and Stale Gates

It is important for your codebase and team to bring feature gates to a final state (i.e. flags now permanently part of your codebase or completely removed) when they have served their purpose, as described here. On Statsig, you can use feature gate Types to easily keep track of your flags that might be ready to brought to their final state.


In your feature gates catalog, you'll see different Types displayed in the Status column, as well as under the filter option - image

  • Permanent Gates (set by you)
    • Permanent feature gates are expected to live in your codebase for an extended period of time, beyond a feature release, usually for operations or infrastructure control. Common examples include user permissions (e.g. premium features based on subscription level) or circuit breakers/kill switches (e.g. terminating a connection to prevent negative customer impact) or even supporting legacy features in old app versions.
      • There are two ways to mark a gate as Permanent:
        • When creating the gate: the Permanent box in the gate creation flow image
        • After a gate has been created: click on the "..." menu and then "Mark Gate Permanent" image
    • Implications of marking a gate as Permanent
      • No change in the gate’s behavior when called
      • Easy filtering on feature gates catalog
      • More caution in its management: while you are able to archive or delete a permanent feature gate, there will be a warning shown before proceeding
      • Statsig will forgo reminding you to clean up these gates and may display them differently in the console
    • You will be able to change the gate back to Temporary at any point.
      • All newly created feature gates are marked as Temporary, unless marked otherwise (i.e. Permanent). Therefore, Statsig will not display the phrase Temporary in the feature gates Catalog or within the individual gates page.
  • Stale Gates (set by Statsig)
    • Stale feature gates indicate to your team that these gates could be a good candidate for cleanup. Statsig automatically marks gates as stale based on the following definition (excludes Permanent and newly created gates) -
      • 0 checks within last 30 days OR
      • gate rolled out to 100% or 0%
    • Implications of gates being marked as Stale
      • No change in the gate’s behavior when called
      • Easy filtering on Feature Gates catalog
      • Will include the gate in Statsig’s nudges for cleanup (more below)

Nudges to clean up Stale gates

Using the Stale type discussed above, Statsig provides both in-console and external nudges to remind you to cleanup (or make Permanent) your feature gates.

  • In-console
    • See the reminder at the top of the individual feature gate page image
  • Email/slack (coming soon!)