Blog

Monitoring a user flow: sign-in, cart, and checkout

Every endpoint monitor is green, yet nobody can place an order. Each request returns 200 on its own; what breaks is the link between them: the cart doesn’t see the item, checkout gets an expired token. Checking a single URL won’t catch this. A chain monitor in Microkoi Bench runs the whole flow on a schedule and shows the step where it breaks.

Why green monitors don’t save you

A cart monitor checks that the cart responds. It doesn’t check that you can add an item and check out. Marketplace bugs tend to live between requests: in the token, the id, the status that hasn’t changed yet.

Take a “Marketplace order” chain on the staging server, under a test user. Sign-in sits in the “Authorization” block, followed by four steps:

StepRequestExpectation
“Authorization”POST /auth/logintoken for the other steps
1 “Cart”PUT /cart/items“Status code” 200
2 “Checkout”POST /orders“Status code” 201
3 “Order”GET /orders/{{orderId}}“JSON value” data.status “equals” created
4 “Cancel order”POST /orders/{{orderId}}/cancel“Status code” 200

The monitor sends these requests for real, every few minutes. Point it only at staging under a test user, and cancel the order in the last step so staging doesn’t pile up hundreds of orders.

Add the chain to monitoring

  1. Open the chain in “Requests” and click “Add to monitoring” in its header. The monitoring icon button on the chain’s row in the tree, “Check the chain in Monitoring”, does the same.
  2. Unsaved changes are saved first: the monitor checks the chain from its file.
  3. Bench opens “Monitoring” with the new monitor: the chain’s name, the active environment, a check every 5 minutes.

The monitor references the chain instead of copying it. Change an expectation or add a step in “Requests”, and the next check runs the updated chain.

Change the interval and retries with “Edit” on the monitor card: “Check every” goes from 20 seconds to an hour, and “Retries” sets how many times an error must repeat before the monitor is down. There are no success conditions in the settings: expectations live in the chain’s steps.

Five minutes per run

One check is one full run of the chain, and step pauses and repeats count toward its time. A run is limited to 5 minutes. If the chain’s pauses alone take longer, Bench warns you up front with a “Doesn’t fit a monitor run” bar and names the step before which every check will stop.

The monitor doesn’t sign in on every check. The “Authorization” block’s token is shared with runs in “Requests”: the monitor refreshes it before it expires or after a 401 response. How to set up the block is covered in “A request chain with authorization: token and refresh_token”.

Where the flow broke

The monitor card names the chain and its size, “4 steps and authorization”. The failure cause names the step: Step 2 “Checkout”: status code 409, expected 201.

As with a regular monitor, going down opens an incident and sends a system notification, ““Marketplace order” is down”, with that cause. A flow that fails every other time doesn’t go down; it becomes “Unstable”: the dot is half yellow, half red, and the card shows how many checks failed.

Which step breaks most often

The “Analytics” block on the card shows “Chain steps” for the selected period, the same strip as in the editor. Each step shows the share of runs that broke there, a line like “25 of 2,013”, and the step’s p95. The step where the chain broke most often has a red frame, with the main cause under it.

What you seeWhat it means
Red frame on “Checkout”The flow breaks when the order is created, not at sign-in
“Not run in this period” on a stepNo run reached that step
Many “Signed in again” under “How the token was obtained:”Token refresh fails, so the monitor signs in again

In “Incidents”, each outage has a strip of steps: the circle is authorization, the squares are steps, green passed, red broke the chain. In “Checks”, the step is written before the cause, and clicking a row opens the response of the step where the chain broke.

What to know up front

  • Checks run while Bench and this workspace are open. This watches staging while you work; it isn’t round-the-clock production monitoring.
  • The interval is at least 20 seconds, and no more than four checks run at once: monitoring doesn’t create load.
  • Responses of intermediate steps aren’t stored. Bench keeps the response of the step where the chain broke, or of the last step for a passing check.
  • The monitor doesn’t write variable values anywhere: the environment stays as it was.

Put your app’s main flow on monitoring in beta 0.9.6 and write to beta@microkoi.com about the step where it broke first. We read every email.

Microkoi BenchMonitoringScheduled endpoint checks

Try it on your own project

The beta is free and needs no sign-up. Download it, pick your project folder and start the proxy — your first requests will show up within minutes.

Version 0.9.6 · macOS, Windows and Linux · no sign-up