—Rate this article—
 

Step 3: Trace API calls

The Trace feature lets you review data on how a message changes as policies are executed. You can see how each policy is performing, and how long it takes to execute. By examining the data, you can see exactly where things are breaking down. Trace shows you data from a number of calls taken from live data. However, since the WeatherAPI is not live you'll send calls manually so you can see how policies are being executed.

  1. In API Platform UI, click the APIs tab. If the API Platform is not open, click here.

  2. Click weather in the API Proxies table.
  3. On the weather detail page, click Trace to access Trace view, then select the "test" environment.

  4. Click Start Trace Session.

    This runs a trace session for 2 minutes. While the trace session is running, messages are captured from live traffic. However, since your API has not be exposed to developers, you won't have any traffic. In this case, you can send messages directly to your API within the trace session. Click Send in the Send Requests section to issue a GET request to your API.

    You can click Send multiple times to generate as much traffic as you wish.

    You can also use the Apigee Console to send a message directly to your API. To do that:

    • Click Send with the Apigee Console.
      The console appears in another window displaying your facade URL.
    • Click Send.
      This sends a call to your API. You can click send multiple times to generate as much traffic as you wish.
    • Switch back to the trace session.

    The processing time for each message appears in the Transactions section.

  5. Click the first message in the Transactions section.
    The response and request flows of your API call are shown graphically in the Transaction section (below the Send Requests section). Below the graphic you can see the results of the first step in the request flow.

  6. Click the Next button on the far-right of the window to see how the Spike Arrest policy executed.
  7. Click Next again to see the response from the backend service.
    At each step you can expand the results to get more detail. In this case, expand the Content section so you can see the forecast data that was sent back from the Yahoo weather service. 

Learn more

Troubleshoot API traffic using Trace

Help or comments?

  • Something's not working: See Apigee Support
  • Something's wrong with the docs: Click Send Feedback in the lower right.
    (Incorrect? Unclear? Broken link? Typo?)