Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(flags): document the PR canary in the rust service docs (#106961)

Gustavo H. Strassburger95d28be9c065
diff --git a/docs/internal/feature-flags/rust-service-overview.md b/docs/internal/feature-flags/rust-service-overview.md
index 40c0cc0d422f..f282e0112acf 100644
--- a/docs/internal/feature-flags/rust-service-overview.md
+++ b/docs/internal/feature-flags/rust-service-overview.md
@@ -29,7 +29,9 @@ Key routing details:
- `/decide` adds an `X-Original-Endpoint: decide` header so the Rust service can adjust response format
- A **dedicated subdomain** (`us-d.i.posthog.com` / `eu-d.i.posthog.com`) routes only to `decide` + `feature-flags` with no Django fallback
- All flag routes have a **5-second timeout** and 2 retries on `reset`/`cancelled`
-- Canary rollouts are supported via Argo Rollouts adjusting weights on the HTTPProxy resources
+- A PR canary (`/pr-canary` on an approved PR) adds a weighted `feature-flags-pr-canary` entry to the `/flags` and `/decide` routes
+- The same canary adds `X-PostHog-Fleet: canary` and `X-PostHog-Fleet: stable` header routes, so a request can pick a fleet
+- The canary weight comes from the state file in the charts repo, not from Argo Rollouts
### Fleet split
diff --git a/rust/feature-flags/README.md b/rust/feature-flags/README.md
index ca441f75e5cd..35aa51d6efb7 100644
--- a/rust/feature-flags/README.md
+++ b/rust/feature-flags/README.md
@@ -50,3 +50,10 @@ RUST_LOG=debug cargo run --bin feature-flags
```sh
cargo fmt --package feature-flags
```
+
+# Trying a PR against live traffic
+
+Members of `team-feature-flags` can comment `/pr-canary` on an approved PR authored by an active PostHog organization member to build the `feature-flags` image from the PR head and route a share of traffic to it.
+The default target is `dev`. `/pr-canary help` lists the `weight=` and `env=` options.
+Send a request with the `X-PostHog-Fleet: canary` header to reach the canary pods, or `X-PostHog-Fleet: stable` to skip them.
+The canary stops when the PR closes, or after 48 hours.