Follow along with the demo captures¶
The examples in this guide run on three HAR files that you can download. They are enough to try every command and get exactly the output shown, without capturing anything yourself.
The captures are synthetic
They were generated by scripts/docs-make-demo-hars.py, not recorded from a real service. The
shop is called shop.example, a name reserved so that it can never be a real site. The
addresses come from ranges reserved for documentation, and every token and key is a made-up string.
The output you see is real WireTrail output on these files, and each file says that it is
synthetic in its log.comment field.
Download them¶
You need WireTrail on your PATH first. See Download and install.
curl -fsSLO https://wiretrail.neerdael.nl/assets/downloads/checkout.har
curl -fsSLO https://wiretrail.neerdael.nl/assets/downloads/baseline.har
curl -fsSLO https://wiretrail.neerdael.nl/assets/downloads/sanitized.har
If you cloned the repository, they are in docs/user-guide/assets/downloads/.
| File | What it is | Entries |
|---|---|---|
checkout.har |
A 70-second session of a web shop: load the page, sign in again, browse, search, check out. It holds the problems this guide teaches you to find. | 99 |
baseline.har |
The same session from an earlier build with most of those problems removed. It still has a 502 that succeeds on a retry, one failed banner request and some repeated calls, so summary exits 1 on it, but diagnose and auto find nothing and exit 0. Compare and the CI gate use it as the known-good capture. |
53 |
sanitized.har |
checkout.har as an exporter that strips credentials and bodies would write it. Validate uses it. |
99 |
for f in checkout baseline sanitized; do printf '%s.har: ' $f; wiretrail $f.har export | wc -l | tr -d ' '; done
A first look at what the main capture contains:
HAR 1.2 via WireTrail demo generator (synthetic) (99 entries)
with timings: 99% · response bodies: 81% · POST req bodies: 100%
auth headers: true · cookies: true
anomalies:
status-0: 1
What is planted in checkout.har¶
This is the answer key. Each row says what to look for, which entries show it, and where to read about the command that finds it. Entry ids are the same in every command.
| What happened | Entries | Find it with |
|---|---|---|
The page loads through a redirect from www to the bare host |
e000000 |
Redirects |
| The same image URL is redirected six times, once per view | e000007, e000020, e000039, e000053, e000067, e000074 |
Redirects |
| The app starts with an expired token and gets 401 three times | e000011 to e000013 |
Auth failures and refresh, JWTs |
| A token refresh succeeds, but a call sent just after it still carries the old token | e000014, e000015 |
Debug a token refresh race |
| Product list pages are requested, and page 3 twice | e000022 to e000025 |
Pagination and N+1 |
| One request per product to fetch a price: twelve in a burst | e000026 to e000037 |
Spot an N+1, Storms |
| A heartbeat call repeats every 1.5 seconds with only a timestamp changing | e000038, e000041, ... |
Remove redundant calls, What varies between calls |
| A stock call fails with 502 and succeeds on the second try | e000054 to e000056 |
Retries |
| An image request fails before any status arrives, then succeeds | e000059, e000064 |
Errors, Validate a capture |
| A cart sync is tried five times (four retries) and never recovers | e000069 to e000076 |
Retries, Your first triage |
A search endpoint answers 429 with Retry-After, and the app keeps calling |
e000077 to e000081 |
Rate limits |
| A payment is declined, and the first attempt has no idempotency key | e000087, e000088 |
Rules and rule packs |
| One call waits 2.4 seconds on the server | e000090 |
Slowest calls, Why a call is slow |
| Calls that lose their time to DNS, connecting, queueing, uploading and downloading | e000086, e000021, e000032, e000092, e000009 |
Slowest calls, Timing phases |
| Bodies and content types that do not match | e000091, e000093 to e000096 |
Built-in checks |
| A download link with a token and a signature in its query string | e000098 |
How redaction works |
The small files for the limitations¶
Limitations shows behaviors that a reader might not expect.
Each has a tiny capture of its own, in assets/downloads/quirks/, so you can run the command and see
it yourself. The page names the file next to each claim.
Set up a work folder¶
Every command in this guide runs in a folder that holds the three files:
mkdir wiretrail-demo && cd wiretrail-demo
# download the three files here, then:
wiretrail checkout.har
Related¶
- Your first triage is a guided walk through the main capture.
- Choose the right command maps a question to a command.
- About explains how the demo captures and every block of output are generated.