TapCub is live — analytics, insights and live chat, free on one platform
Product News

Testing in Production: Safe Patterns and What to Monitor

How to test in prod without hurting users: flags, canaries and dark launches, a stage plan with a pageview floor, the metrics to watch and a recomputed canary that looks fine and is not.

Lin Zhou Published Nov 22, 2026 12 min read Product News
Sample data: 10,000 canary pageviews with 52 errors against 190,000 control pageviews with 760 errors. The canary is 30% higher, but z is about 1.84 (p about 0.066), so the honest answer is to keep collecting.Sample data

Testing 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?

PatternWhat users getHow you undo itTypical use
Feature flagNew code is deployed but off; you turn it on for a groupTurn the flag off, no redeployReleasing a feature to staff first, then a percentage
Canary releaseNew version serves a small share of trafficRoute traffic back to the old versionBackend and infrastructure changes
Dark launch (shadow traffic)Nothing visible; the new path runs in parallel and results are comparedStop the shadow pathChecking a new search or pricing engine against real inputs
Staged rollout1%, then 5%, 25%, 100%Stop or reverse at any stageEvery release that touches many users
Synthetic probesA scripted user hits the live site on a scheduleNot 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.

PatternHow you undo itTypical use
Feature flagTurn the flag off, no redeployStaff first, then a percentage
Canary releaseRoute traffic back to the old versionBackend and infrastructure changes
Dark launchStop the shadow pathCheck a new engine against real inputs
Staged rolloutStop or reverse at any stageAny release touching many users
Synthetic probeRead-only, nothing to undoCatch 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:

StageTraffic to new versionMinimum holdMove on only if
0. Staff onlyInternal users1 working dayNo new error groups
1. Canary1%30 minutes, and at least 2,000 pageviews on the canaryError rate not above the stop line
2. Early5%2 hours, covering a traffic peakError rate and LCP inside limits
3. Wide25%1 daySame, plus no rise in support contacts
4. Full100%Keep the flag for one week, then remove itRemove 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."

PageviewsErrorsError rate
Control (95%)190,0007600.400%
Canary (5%)10,000520.520%
Overall200,0008120.406%

Three readings of the same table:

  1. 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).
  2. 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.
  3. 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.

app.tapcub.com

Error rate by version

sample data, % of pageviews
Canary (5%)0.520%
Overall0.406%
Control (95%)0.400%
Sample data
Sample data: 10,000 canary pageviews with 52 errors against 190,000 control pageviews with 760 errors. The canary is 30% higher, but z is about 1.84 (p about 0.066), so the honest answer is to keep collecting.

What 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.

  1. Mark the rollout. Add a date annotation in Configuration › Annotations for each stage so the charts show when 1%, 5% and 25% began.
  2. 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.
  3. 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.
  4. Set a tripwire. In All-platform analytics › Operations › Monitors, create a monitor on error_rate or errors checked 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.
  5. 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

Filed underProduct News

Was this article helpful?

We use your answers to fix and expand this page.

Lin Zhou

Product Experience Specialist

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

Watch the rollout in real time

Error rate, Core Web Vitals, date annotations and monitors for the stages of a release.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics