Feature flags
Roll features out gradually with boolean and multivariate flags.
Feature flags turn features on or off — and roll them out to a percentage of users — without redeploying. They're managed in the dashboard and read in code via Spectry.getFlag().
Create a flag
- Go to Feature Flags → Create flag.
- Set a unique key (used in code; immutable once created), a name and optional description.
- Choose a type: Boolean (on/off) or Multivariate (multiple variants).
- Set a rollout percentage (0–100%) and the enabled toggle.
Multivariate variants
For multivariate flags, add variants — each with a key, a value (string or JSON) and a weight. Visitors are distributed across variants in proportion to their weights. This is the way to run an uneven split, which A/B test variations don't offer.
Managing flags
- Toggle a flag on/off from the list for an instant kill switch.
- Edit name, description, rollout % and variants at any time (the key is locked).
- Delete a flag when it's no longer needed.
Flags vs A/B tests
They solve different problems and are easy to confuse:
- A flag controls whether code runs. It has no goals and no results table — you're managing a release, not measuring one.
- An A/B test measures the effect of a change against a goal, with statistics attached.
The two pair well: ship behind a flag, ramp the rollout, and run a test to measure impact before going to 100%.