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

What is canary testing? Canary releases explained with an example

Canary testing releases a new version to a small share of real users first and compares its health with the current version before rolling it out to everyone. How it differs from beta and blue-green, and a worked rollback decision.

Lucas Hayes Reviewed by Chen Yu Also called canary release Last updated Nov 7, 2026 Glossary

Quick answer

Canary testing (a canary release) is a release practice in which a new version is first served to a small share of real production users or traffic, its health is compared with the current version, and it is rolled out further only if it performs as well, otherwise rolled back.

Formula: Promote if canary metric ÷ baseline metric ≤ threshold

What is canary testing?

Canary testing, or a canary release, sends a new version of software to a small share of real production users or traffic first, compares its health with the current version running alongside it, and rolls it out further only if it holds up. If the canary looks worse, traffic goes back to the old version before most users ever see the problem.

The name comes from the canaries miners carried underground: the birds reacted to toxic gas before people did. The canary group is the early warning.

Canary testing vs other release practices

PracticeWho gets the new versionPurpose
Beta testingVolunteers who opt in, know it is unfinishedFind bugs and usability issues before release
Canary releaseA small random share of normal users, without opting inCheck that a production release is safe
Blue-green deploymentEveryone, switched at once between two environmentsZero-downtime switch with instant rollback
Feature flag rolloutChosen users or a percentage, per featureTurn a feature on or off independently of deploys
A/B testA random split, for a fixed periodDecide which version performs better

In practice these combine: code deploys behind a canary, and features inside it are switched on with flags.

How canary testing works

  1. Deploy the new version next to the current one. Both serve production traffic.
  2. Route a small share to the canary, often 1–5%, assigned randomly and kept sticky per user.
  3. Compare canary with baseline over the same window. Compare against the current version running now, not against yesterday, so time-of-day and traffic mix cancel out. Google's SRE guidance recommends exactly this side-by-side comparison.
  4. Check a short list of metrics: error rate, latency (p95/p99), crash-free users for apps, and one or two business signals such as checkout completion.
  5. Promote in steps (for example 5% → 25% → 50% → 100%) or roll back automatically if a threshold is crossed.

A worked example: promote or roll back?

Sample data for one hour with a 5% canary. The rule, set in advance: roll back if the canary's error rate is more than 1.2× the baseline's.

RequestsErrorsError rate
Baseline (current version, 95%)190,0005890.31%
Canary (new version, 5%)10,000420.42%

Ratio = 0.42 ÷ 0.31 = 1.35, above the 1.2 threshold, so the canary is rolled back. Only 5% of users were exposed, for one hour. Note that the canary still had only 42 errors: with 1% of traffic it would have had about 8, too few to tell apart from noise. Choose the canary share so each window produces enough events to decide.

Mobile apps: phased and staged rollouts

Apps cannot be rolled back on users' phones, so the stores provide the canary mechanism:

  • Apple phased release spreads an update to users with automatic updates on over seven days (1%, 2%, 5%, 10%, 20%, 50%, 100%). You can pause it for up to 30 days in total.
  • Google Play staged rollouts release to a percentage of users you choose and can be increased, or halted if problems appear.

The comparison works the same way: the new version's crash-free users and error counts against the previous version's, over the same days.

Common pitfalls

  • Comparing with the past instead of with the baseline running now.
  • Canary too small to produce enough events in the window.
  • Only technical metrics. A release can be error-free and still break checkout; include one business guardrail metric.
  • Non-sticky assignment, where a user bounces between versions mid-session.
  • Long-lived canaries that drift into an unplanned permanent split.

Measuring a canary with TapCub

TapCub does not deploy code or route traffic; it measures the result.

  • Apps: App analytics › Users › Versions shows each version's share of active users and crash count, and App analytics › Quality & attribution › Stability gives the crash-free share filtered by version. See crash-free rate and track app versions.
  • Web: the performance report shows JavaScript error count and error rate (errors ÷ pageviews). See find JavaScript errors.
  • Alerts: a monitor on the built-in error_rate or errors measure can notify you when a release pushes errors past a threshold, and an annotation marks the deploy on every chart.

Sources

Was this explanation clear?

We use your answers to fix and expand this page.

Lucas Hayes

Data Engineer

Writes about event design, data quality, and collection workflows, with verifiable implementation methods for reliable analytics.

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

Why is it called a canary release?

Miners once took canaries into coal mines; the birds reacted to toxic gas before people did. A canary release exposes a few users first so problems show up before they reach everyone.

What is the difference between canary and blue-green deployment?

Blue-green switches all traffic from the old environment to the new one at once, with a fast switch back. Canary moves traffic gradually and compares the two versions side by side.

What percentage of traffic should a canary get?

Often 1–5% to start, then steps such as 10%, 25%, 50% and 100%. The share must be large enough to produce a meaningful number of errors and requests within the analysis window.

Is canary testing the same as A/B testing?

No. Both split traffic, but a canary asks whether the new version is safe to release, while an A/B test asks which version performs better on a business metric.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

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