Skip to content

Turn off a canary feature flag after a threshold check

Set a rule for when a canary should be turned off. Olyvr measures it, shows you the numbers, and asks before it touches the flag.

  • The PostHog plugin, connected and signed in to the project that owns the flag.
  • A clear rule: the error rate limit, the minimum number of events, and the time window.
  • Approvals on Ask for approval or Approve for me. Avoid Full access for this. See approvals.

Check the new-checkout canary in the Storefront project. If its error rate is over 5 percent with at least 100 events in the last two hours, show me the evidence and ask before turning the flag off.

  1. Finds the project and the flag, and confirms you mean that project.
  2. Counts errors and total events for the canary group in that window, and calculates the rate.
  3. Checks your rule. If it isn’t met, for example too few events or a rate at or under 5 percent, it stops and changes nothing.
  4. If the rule is met, shows the project, the flag’s current state, the counts, the rate and the window, and asks you to approve.
  5. Checks the flag again right before changing it, turns it off, and reads it back.
  • In PostHog, the flag is off in the right project, and nothing else changed.
  • The numbers Olyvr showed match what you see for the same window.
  • The query fails. Olyvr doesn’t change the flag without numbers. Fix access and ask again.
  • The flag is already off. Olyvr tells you and makes no change.
  • Someone changed the flag after you approved. Ask Olyvr to check again before you approve a new change.