PostHog / PostHog/posthog

Feature request: circuit breakers

Open
#55,438 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement team/experiments
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

Feature request

Context: https://posthog.slack.com/archives/C07PXH2GTGV/p1776754497414459

Is your feature request related to a problem?

Customers running experiments (especially those with AI-generated experiment code or autonomous/agentic workflows) have no way to automatically halt an experiment when a business-critical metric degrades beyond a threshold. Today, if an experiment is tanking a core metric (e.g. AOV drops below X, conversion rate drops by Y%), a human has to be paged, potentially overnight, to manually pause or stop the experiment via the UI or API. This is a dealbreaker for teams that ship many experiments quickly, have lean on-call rotations, or use AI agents to write and launch experiment code without a human in the loop per change.

Describe the solution you'd like

A configuration on the experiment itself that lets users:

  • Define one or more guard metrics (absolute value or % change threshold) to monitor during the experiment. Likely after a minimum amount of exposures for more reliable metrics
  • Automatically route 100% of traffic to the control variant when any guard metric trips
  • Optionally notify a channel (Slack, webhook) and annotate the experiment with the trip reason
  • Configure this via the UI and the API (so AI-driven workflows can set it at experiment creation time)

Describe alternatives you've considered

  • a trend insight + alert -> webhook -> API call that sets the experiment end date
  • scheduled flags + metric-based workflows

None of this is native, discoverable, or reliable enough

Additional context

Feature gap

Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by mapping the existing experiment configuration and traffic-routing surfaces exposed through the UI and API. Review how experiment metrics, Slack or webhook notifications, and experiment annotations are currently handled. Done means guard metrics can be configured, trigger control traffic reliably, and expose the trip reason through the requested interfaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
analytics, api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.