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.
- In API Platform UI, click the APIs tab. If the API Platform is not open, click here.
- Click the WeatherAPI in the summary table.
- On the WeatherAPI detail page, click Trace > test. This will let you set up a Trace session on the test environment.
- Click Listen.
While the Trace session is Listening, messages are captured from live traffic.
Since your API has not be exposed to developers, you won't have any traffic. In this case, you can use the Apigee Console to send a message directly to your API.
- Click Open 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 Apigee and click Stop.
The call appears in the Captured Messages section.
- Click the first message.
The response and request flows of your API call are shown graphically at the top of the window. Below the graphic you can see the results of the first step in the request flow.
- Click the Next button on the far-right of the window to see how the Spike Arrest policy executed.
- 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.