---
title: "Two changes shipped together. Which one caused it? | Proofline"
description: "When a code change and a configuration change ship in one release, the error graph after the release fits either of them."
url: https://proofline.sh/learn/two-changes-shipped-together-which-caused-it/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# Two changes shipped together. Which one caused it?

When a code change and a configuration change ship in one release, the error graph after the release fits either of them. Each change reaches a different part of the traffic, so split the error rate by the routes, flag cohorts or regions each one touches: the responsible change's share rises and the other's stays at its baseline. Then confirm by reverting or switching off one change alone and watching its share of the traffic.

Deployment failures The Proofline team November 24, 2026 7 min read

## The symptom and the explanations

The example is illustrative. A fictional `storefront` service shipped release `r318` at 10:00 UTC. It carried two changes from two teams:

-   Change A rewrote the order serializer, which only the `/orders` and `/orders/{id}` handlers call.
-   Change B lowered the search backend timeout from 2 s to 500 ms, a configuration value only the `/search` handler reads.

Between 10:00 and 11:00 the 5xx rate rose from 0.25% to about 1.1%. Each team had a plausible story about why the other change was the cause. Rolling back `r318` would stop the errors and say nothing about which change to fix, because it removes both. [Does a rollback prove the release caused it?](/learn/does-a-rollback-prove-the-release-caused-it/)

The explanations are: A caused it, B caused it, both contributed, or something else changed at 10:00 and neither did. [Choose the observation where explanations disagree](/learn/which-observation-separates-two-explanations/)

## What each explanation predicts

| Observation | A caused it | B caused it | Something else at 10:00 |
| --- | --- | --- | --- |
| Total 5xx rate | rises | rises | rises |
| 5xx rate on A's routes (`/orders`, `/orders/{id}`) | rises | baseline | depends on what it reaches |
| 5xx rate on B's route (`/search`) | baseline | rises | depends on what it reaches |
| 5xx rate on routes neither change touches | baseline | baseline | likely rises |
| After B alone is switched back | A's routes stay high | B's route returns to baseline | no change |

The total rate is the graph both teams were looking at, and every explanation predicts it. The rows split by route separate A from B, and the row for untouched routes is the control: if `/account` rose as well, the cause is probably neither change. If both changes are guilty, both subsets rise, each by its own amount.

The split is the cheap observation. The toggle is the confirming one, because it changes one cause and holds the other fixed. Change B is a configuration value, so switching it back is quicker and smaller than reverting a code change and building again.

## The lab: one release, two culprits

The script generates 40,000 requests per hour for three hours: an hour before the release, an hour on `r318`, and an hour with change B switched back. Routes are drawn with fixed shares, every route fails 0.2% of the time in the background, and the responsible change adds 3% to the routes it touches. A and B touch 30% of the traffic each, so the total rate rises by about the same amount whichever is responsible. It needs Python 3.8 or later.

```
import random, sys

# Release r318 at 10:00 carried two changes:
#   A, a code change to the order serializer, used by /orders and /orders/{id}
#   B, a config change: search backend timeout 2s -> 500ms, used by /search
ROUTES = {"/orders": 0.10, "/orders/{id}": 0.20, "/search": 0.30, "/account": 0.40}
TOUCHED = {"/orders": "A", "/orders/{id}": "A", "/search": "B", "/account": "-"}

def error_p(route, phase, culprit, b_reverted):
    p = 0.002                                            # background failure rate everywhere
    change = TOUCHED[route]
    if phase == "after" and change == culprit and not (change == "B" and b_reverted):
        p += 0.03
    return p

def log(culprit, phase, rng, n=40000, b_reverted=False):
    for _ in range(n):
        route = rng.choices(list(ROUTES), weights=list(ROUTES.values()))[0]
        yield route, rng.random() < error_p(route, phase, culprit, b_reverted)

def rates(rows):
    out = {}
    for change in ("A", "B", "-"):
        mine = [err for route, err in rows if TOUCHED[route] == change]
        out[change] = sum(mine) / len(mine)
    out["all"] = sum(err for _, err in rows) / len(rows)
    return out

if len(sys.argv) not in (2, 3) or sys.argv[1] not in ("A", "B"):
    sys.exit("usage: python3 two_changes.py A|B [seed]")
culprit = sys.argv[1]
rng = random.Random(int(sys.argv[2]) if len(sys.argv) > 2 else 4)
print(f"culprit={culprit}             all    A routes  B routes  neither")
for label, phase, rev in (("09:00-10:00 before", "before", False),
                          ("10:00-11:00 r318", "after", False),
                          ("11:00-12:00 B reverted", "after", True)):
    r = rates(list(log(culprit, phase, rng, b_reverted=rev)))
    print(f"  {label:22s} {r['all']:6.2%} {r['A']:9.2%} {r['B']:9.2%} {r['-']:8.2%}")
```

Save it as `two_changes.py`. Before running it, write down which column rises in each world and what the last row does when B is switched back. The prediction is that the "all" column rises to about 1% in both worlds, that only the culprit's column rises, and that switching B back clears the errors only in the world where B is the culprit.

```
python3 two_changes.py A
python3 two_changes.py B
```

Python 3.11 printed:

```
culprit=A             all    A routes  B routes  neither
  09:00-10:00 before      0.25%     0.19%     0.33%    0.23%
  10:00-11:00 r318        1.04%     3.12%     0.16%    0.17%
  11:00-12:00 B reverted  1.18%     3.40%     0.24%    0.21%
culprit=B             all    A routes  B routes  neither
  09:00-10:00 before      0.25%     0.19%     0.33%    0.23%
  10:00-11:00 r318        1.15%     0.25%     3.34%    0.17%
  11:00-12:00 B reverted  0.22%     0.21%     0.24%    0.21%
```

The total rate on `r318` was 1.04% in one world and 1.15% in the other, a difference no one would read as a signal. The split by route was unambiguous: about 3% on the culprit's routes and the background rate on the others. Switching B back cleared the errors in the B world and changed nothing in the A world, where the A team would otherwise have spent the hour defending their serializer.

The prediction would have failed if both route groups had risen in a world with one culprit, or if the untouched routes had moved. Change the seed with a second argument, such as `python3 two_changes.py B 9`, and the percentages move by a tenth of a point or so while the pattern stays. The split works here because A and B reach different routes; the limits below cover what to do when they do not.

## Read it on a real system

First, map each change to the traffic it can reach. For code, that is the handlers, jobs or consumers that call the changed functions, which the diff and a search for callers show. For configuration, it is every reader of the changed key. For a feature flag, it is the cohort that evaluated the new variant; OpenTelemetry's feature flag conventions record each evaluation with `feature_flag.key` and, where the provider supplies one, `feature_flag.result.variant`, though those events are still marked in development. [Feature flag events](https://opentelemetry.io/docs/specs/semconv/feature-flags/feature-flags-events/)

Then read the error rate for each subset over the same minutes. With Prometheus request metrics labelled by route and status, one query gives every route's error ratio. [rate](https://prometheus.io/docs/prometheus/latest/querying/functions/)

```
sum by (route) (rate(http_server_request_duration_seconds_count{service="storefront", status=~"5.."}[5m]))
  /
sum by (route) (rate(http_server_request_duration_seconds_count{service="storefront"}[5m]))
```

Label names differ between instrumentation libraries. OpenTelemetry's HTTP conventions use a low-cardinality route template, such as `/orders/{id}`, which is what keeps a split by route readable. [HTTP spans](https://opentelemetry.io/docs/specs/semconv/http/http-spans/) If the release rolled out region by region or the flag by percentage, split by region or by variant in the same way; compare subsets over the same minutes, not one subset before and another after. [Split errors by revision](/learn/bad-release-or-unhealthy-dependency/#split-by-revision)

The confirming step changes production, so it belongs to whoever is allowed to make that change. Switching a configuration value or flag back is usually the smaller step. For code, `git revert` records a new commit that undoes the changes of an earlier one, which lets you ship the release minus one change. [git revert](https://git-scm.com/docs/git-revert) Watch the subset of the change you reverted, not the total.

## Where the split misleads

Two changes can reach the same traffic. A shared library update and a connection pool setting both affect every route, and the split by route shows the same rise everywhere. Then the toggle is the only observation that separates them, or a per-request attribute that records which code path ran.

A change can reach further than its diff suggests. A slower `/search` can hold connections from a shared pool and make `/orders` fail, so the culprit's errors appear in the other change's subset as well. Look at which subset rose first and by how much, and at the error messages: timeouts waiting for a pool point to a shared resource.

Low-traffic subsets give noisy rates. A route with a few hundred requests an hour can show 0% or 2% by chance; widen the window or compare counts against what the background rate predicts.

Both changes can be guilty, and the interaction can matter. If A fails only when B's shorter timeout fires, neither toggle alone tells the whole story. The table then needs a fourth column, and the combined toggle is the test.

## Questions

### How do I find which change in a release caused errors?

List the traffic each change can reach, such as routes, jobs, flag cohorts or regions, and compare the error rate of each subset with its own baseline over the same minutes. The subset that rose belongs to the culprit. Confirm by switching off that change alone.

### Is rolling back the whole release enough?

It is often the right action to stop the harm. It is weak evidence about which change caused it, because it removes every change at once, along with anything else the rollback restarted. Use the split by subset to decide what to fix before the release ships again.

### What if the two changes touch the same code path?

The split by route cannot separate them. Switch one off at a time, or record on each request which of the two behaviors it used, so the error rate can be split by that attribute.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Does a rollback that cleared the errors prove the release caused them?](/learn/does-a-rollback-prove-the-release-caused-it/)
    
    Deployment failures The Proofline team November 20, 2026 9 min read
    
-   ### [Which observation separates two explanations of the same symptom?](/learn/which-observation-separates-two-explanations/)
    
    Deployment failures The Proofline team November 24, 2026 10 min read
