Where a slow checkout spent its time

Why did this checkout take 1.8 seconds?

Two thirds of it was the Stripe call, and most of that was waiting on Stripe, not the TLS handshake. A cache miss on prices cost another 350 ms before payment even started.

What it shows

9 of 9 file citations checked against the repository

The diagram as text

Spans, in call order

Total 1.8 s. What it waited on, in order: verify session → redis MGET price:* → select price from products (cache miss) → stripe.PaymentIntent.create → TLS handshake api.stripe.com → insert into orders → publish fulfilment.

Notes

▬ a span, to scale▭ what the whole waited on (the critical path)▭ failedtotal 1.8 s
0 ms500 ms1.0 s1.5 sPOST /checkout — 1.8 sPOST /checkout1.8 sverify session — 34 msverify session34 msprice cart — 380 msprice cart380 msredis MGET price:* — 19 msredis MGET price:*19 msselect price from products (cache miss) — 346 msselect price from products (cache miss)346 msstripe.PaymentIntent.create — 1.2 sstripe.PaymentIntent.create1.2 sTLS handshake api.stripe.com — 89 msTLS handshake api.stripe.com89 msinsert into orders — 165 msinsert into orders165 mspublish fulfilment — 44 mspublish fulfilment44 ms