Try it on your own data
Every report in this article is in the free plan. One snippet for web and apps, up to 10 sites.
Start freeTesting in production means verifying a change on live traffic after pre-production tests, while limiting how many users it can reach. Make it safe with a flag or canary, a stage plan with a minimum pageview count per stage, version-level metrics (error rate, Core Web Vitals, one business guardrail) and a rollback rule written beforehand. In the sample, a 5% canary hid a 30% rise in errors inside the overall rate.
What you will learn
- Compare canary with control by version at the same time; the overall rate hid a 30% rise in the sample
- Give every stage a minimum pageview count: about 19,500 per group to detect 0.40% to 0.60% errors
- Write the stop rule before the rollout and remove release flags within a week or two
What does testing in production mean?
Testing in production means checking a change against real traffic in the live environment, after it has passed your pre-production tests, while limiting how many users it can hurt. It is an addition to staging tests, not a replacement: staging cannot reproduce real devices, real data volumes and real behavior, so some defects only appear live.
The risk is obvious, so the whole discipline is about limiting blast radius and deciding in advance what "bad" looks like. Google's SRE workbook defines canarying as "a partial, time-limited deployment of a change and its evaluation": the portion that gets the change is the canary, the rest is the control. This guide covers the patterns that make a production test safe (flags, canaries, dark launches), the stage plan, the metrics to watch, and a worked example that shows why a small canary can look fine and still hide a problem. The two building blocks are explained separately in canary testing and feature flag.
Which patterns make a production test safe?
| Pattern | What users get | How you undo it | Typical use |
|---|---|---|---|
| Feature flag | New code is deployed but off; you turn it on for a group | Turn the flag off, no redeploy | Releasing a feature to staff first, then a percentage |
| Canary release | New version serves a small share of traffic | Route traffic back to the old version | Backend and infrastructure changes |
| Dark launch (shadow traffic) | Nothing visible; the new path runs in parallel and results are compared | Stop the shadow path | Checking a new search or pricing engine against real inputs |
| Staged rollout | 1%, then 5%, 25%, 100% | Stop or reverse at any stage | Every release that touches many users |
| Synthetic probes | A scripted user hits the live site on a schedule | Not applicable (read-only) | Catching a broken checkout before a customer does |
Martin Fowler's article on feature toggles separates four kinds, and the lifespan differs sharply: release toggles should rarely outlive "a week or two", experiment toggles last only as long as it takes to reach a result, ops toggles (kill switches) may stay, and permissioning toggles can last years. His practical advice is to treat toggles as inventory with a carrying cost: add a removal task when you add a release toggle, give each toggle an expiry date, and cap the total. A production test that leaves flags behind is a future incident.
TapCub is not a flag or traffic-splitting system. It does not decide who sees a change and it does not run A/B experiments. It measures what happens to real visitors while you roll out; the rest of this page is about the measurement side.
| Pattern | How you undo it | Typical use |
|---|---|---|
| Feature flag | Turn the flag off, no redeploy | Staff first, then a percentage |
| Canary release | Route traffic back to the old version | Backend and infrastructure changes |
| Dark launch | Stop the shadow path | Check a new engine against real inputs |
| Staged rollout | Stop or reverse at any stage | Any release touching many users |
| Synthetic probe | Read-only, nothing to undo | Catch a broken checkout early |
TapCub measures the result; the flag or routing comes from your own release tooling.
How do you stage a rollout?
A stage plan fixes three things in advance: how much traffic, how long to hold, and the numbers that stop the rollout. A concrete example, in the shape of one typical web release:
| Stage | Traffic to new version | Minimum hold | Move on only if |
|---|---|---|---|
| 0. Staff only | Internal users | 1 working day | No new error groups |
| 1. Canary | 1% | 30 minutes, and at least 2,000 pageviews on the canary | Error rate not above the stop line |
| 2. Early | 5% | 2 hours, covering a traffic peak | Error rate and LCP inside limits |
| 3. Wide | 25% | 1 day | Same, plus no rise in support contacts |
| 4. Full | 100% | Keep the flag for one week, then remove it | Remove the flag and the old code path |
Two rules from the SRE workbook shape this table. The canary has to be big enough to be representative: ending after a handful of requests gives no signal, and homogeneous traffic needs less than diverse traffic. And performance defects often appear only under heavy load, so an off-peak canary may miss them; hold at least one stage across a peak. The workbook also says to run one canary at a time, so that signals from two changes do not contaminate each other.
What should you watch during a production test?
The workbook's selection rule is a good filter: metrics must indicate problems, be attributable to the change, and have thresholds that are neither so strict they cry wolf nor so loose they let a bad canary through. For a website, a short list covers most cases:
- Error rate: errors ÷ pageviews, split by version. It is the clearest early signal; start with it at the 1% stage.
- Core Web Vitals at the 75th percentile: web.dev's "good" thresholds are Largest Contentful Paint (LCP) of 2.5 seconds or less, Interaction to Next Paint (INP) of 200 milliseconds or less and Cumulative Layout Shift (CLS) of 0.1 or less, each assessed at the 75th percentile of page loads.
- A business guardrail: the one conversion event the change must not damage (checkout started, sign-up completed).
- Support signals: contacts per thousand sessions, so a problem users notice but your instrumentation misses still shows up.
Three habits make these comparisons trustworthy. Compare the canary with the control at the same time, not with last week, because weekday and weekend traffic differ. Break metrics down by version, because an aggregate can hide a canary spike: the workbook's own illustration is that a 5% canary running a 20% error rate adds only about 1% to the overall error rate, which looks like noise on a dashboard. And decide the stop line before you start, not after you see the numbers.
Worked example: a canary that looks fine and is not
Sample data: a 5% canary of a checkout page change serves 10,000 pageviews while the control serves 190,000 in the same window. The team's stop line was written as "error rate above 0.6% on the canary, or a statistically clear rise over control."
| Pageviews | Errors | Error rate | |
|---|---|---|---|
| Control (95%) | 190,000 | 760 | 0.400% |
| Canary (5%) | 10,000 | 52 | 0.520% |
| Overall | 200,000 | 812 | 0.406% |
Three readings of the same table:
- The overall rate hides it. 0.406% against a normal 0.400% looks like nothing. Only the split by version shows the canary 30% higher (0.520 ÷ 0.400 = 1.3).
- The canary is under the fixed stop line. 0.52% is below 0.6%, so a rule that only checks an absolute number passes it.
- A two-proportion test says "not yet". The difference is 0.12 percentage points; the z statistic is about 1.84 and the two-sided p-value about 0.066, which does not clear the usual 5% bar. So you cannot call it a regression, and you cannot call it safe either.
The honest next step is to keep the canary running until it can answer the question. To detect a rise from 0.40% to 0.60% with 80% power at the 5% level takes about 19,500 pageviews per group; to detect a doubling to 0.80% takes about 5,850. The 10,000-pageview canary was big enough for the second question and too small for the first. A stage plan should therefore state the effect size it is designed to catch, not just a duration, and a minimum pageview count for each stage, as the table above does.
A second sample reading, this time for speed. Control p75 LCP is 2.12 s and canary p75 LCP is 2.31 s: both are inside the 2.5 s "good" threshold, so it is not a failure, but the canary is 0.19 s slower and uses 0.19 ÷ 0.38 = half of the remaining headroom. Record it, and ask whether the change should cost that much.
Error rate by version
sample data, % of pageviewsWhat should the rollback rule say?
A rollback rule is a sentence you can apply without a meeting. Write one per stage:
- Stop and roll back immediately if the canary error rate is at least double the control's and the gap is statistically clear, or if any new error group affects more than 1% of canary sessions.
- Hold and keep collecting if the gap is in between and the canary has not reached its minimum pageviews.
- Proceed if every metric is inside its limit and the minimum has been met.
- Always keep the previous version deployable until the flag is removed.
Assign an owner for the decision and say where the call is made (chat channel, release ticket). A rule nobody owns is a rule that is applied after the incident. Annotate each stage on your charts so a later reader can tell which change a bump belongs to.
How do you run it in TapCub?
For the checkout example above, this is the measurement setup in TapCub. TapCub does not split traffic or toggle features, so the canary itself comes from your own flag or deployment tool; TapCub is where you watch the result.
- Mark the rollout. Add a date annotation in Configuration › Annotations for each stage so the charts show when 1%, 5% and 25% began.
- Watch the error rate. In Monitoring › Errors, the error cards show errors, error rate (errors ÷ pageviews), affected visitors and affected sessions. Each error group has a count, sessions involved, last seen and a status of active, resolved or ignored, and opens to show time, page, location, device and session. A new group that appears right after a stage starts is the first thing to check.
- Watch performance. Monitoring › Performance shows real-user Core Web Vitals so you can compare against the 2.5 s, 200 ms and 0.1 thresholds. See check Core Web Vitals and find JavaScript errors.
- Set a tripwire. In All-platform analytics › Operations › Monitors, create a monitor on
error_rateorerrorschecked hourly. Use the dry run, which computes without sending and tells you how many times it would have fired in the past 30 days. A monitor only notifies you; it does not roll anything back. - Check the guardrail. The business event (checkout started, sign-up completed) is a goal under Web analytics › Goals; compare it before and after each stage.
One limit to keep in mind: TapCub reports the whole site, so to compare canary with control you need a way to mark which version a visitor saw, for example as an event property that your flag tool sets. Without it you are back to before-and-after comparisons, which the SRE workbook warns against.
FAQ
Is testing in production a good idea?
Yes, when it is staged and reversible. It complements pre-production testing because real traffic exposes issues staging cannot. It is a bad idea without a flag or routing control, a rollback rule and version-level metrics. Start with a 1% canary and a stop line written in advance.
What is the difference between testing in production and a canary release?
Testing in production is the broad practice of verifying changes on live traffic. A canary release is one way to do it: a small share of traffic gets the new version, the rest is the control, and you compare them before continuing. Feature flags, dark launches and synthetic probes are other ways.
How big should a canary be?
Big enough to answer the question you care about. In the sample, about 5,850 pageviews per group would catch a doubling of a 0.40% error rate, while about 19,500 would catch a rise to 0.60%. Smaller effects need more traffic or a longer hold.
What can go wrong when you test in production?
Users see the defect, a canary that is too small passes a regression, metrics are averaged across versions so the problem is hidden, and old flags are left in the code. Mitigations are staged traffic, version-level metrics, a written rollback rule and expiry dates on flags.
Which metrics should I monitor during a production test?
Error rate by version, Core Web Vitals at the 75th percentile (LCP 2.5 s, INP 200 ms, CLS 0.1 for "good"), one business guardrail event and support contacts. Compare canary with control at the same time, not with last week.
Sources
- Google, Site Reliability Engineering Workbook: Canarying Releases — definition of canarying, canary size and duration, metric selection, the 5% canary at 20% errors illustration.
- Google, web.dev: Web Vitals — "good" thresholds for LCP, INP and CLS at the 75th percentile.
- Pete Hodgson, Feature Toggles (aka Feature Flags), martinfowler.com — four toggle categories, lifespans and advice on removing toggles.
Was this article helpful?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Product Experience Specialist
Writes about product experience, practical workflows, and growth, turning complex processes into clear steps for everyday decisions.
