All workflows
Workflows/Understanding code/05

Trace a request end to end

Send one real request and follow it through the code. The log shows where it went, the agent maps it, nvim shows each stop.

The board

Agent Maps the call path from the log and the source.
nvim Each stop on the path, one jump away.
Processes The api, run with LOG_SQL=1, so each query it sends is logged with the request.

Step by step

  1. 01
    Send the request :!curl localhost:3000/orders/812 from nvim. The api's row in Processes logs the request and the two queries it sent.
    processes
  2. 02
    Ask where it went The agent reads the api's log, then the code, and lists each function the request went through, in order, with its file and line.
    agent
  3. 03
    Walk the path Jump to each stop in nvim with :e +line file as you read down the list.
    nvim
  4. 04
    Draw the map Ask for a sequence diagram of the same path, each arrow linked to its code. Download SVG keeps a copy.
    agent

Close the other windows.

Get ORVEN