Finding one error among thousands of successes

I'm trying to track down an error that is very rare (~ 1 an hour amongst 5000+) and I'm getting swapped by successful entires on the trace. I know which API Proxy has the error, that it is a 4XX error, and that it does not contact the API on my server but I can't catch it in the act using the Trace page. Since I don't know what endpoint is failing or who is calling it I can't attach a custom header to use as a filter. Can anyone suggest another way to debug an API Proxy so I am more likely to catch the errors instead of watching the requests 20 at a time (and possibly missing the errors in-between resets)?

Solved Solved
1 4 287
1 ACCEPTED SOLUTION

ylesyuk
Participant V

Two ideas:

1. Use this utility https://github.com/yuriylesyuk/ets for more efficient sampling. You script fetching traces automatically and your script can check for your 4xx error returned.

2. Look at the request-level analytics and see if you can spot additional information amongst many reported fields.

View solution in original post

4 REPLIES 4

ylesyuk
Participant V

Two ideas:

1. Use this utility https://github.com/yuriylesyuk/ets for more efficient sampling. You script fetching traces automatically and your script can check for your 4xx error returned.

2. Look at the request-level analytics and see if you can spot additional information amongst many reported fields.

Thanks for the code. I have created three debug sessions so far. The first was using the default length of 10000. I called get trace before the timer was up. but it caught a few traces. For the next two I tried to record an hour and the file I got back is not accepted by Apigee Edge because some of the request returned pngs. So I removed that content and loaded that up, and found it still only had 20 responses. Is there a way to record more?

The idea is to run this script in a loop so that you can catch batches of 20 requests.

There is a way to record more, but only if you're using on-premises version of the Edge.

See this article for details:
https://community.apigee.com/questions/39080/increasing-the-limit-of-trace-messages-in-edge-on.html

It worked. Since it stops at 20 and I don't know for sure when it hits 20 I had to run it pretty hard for a few hours. The ones I caught turns out to be search bots from Apple and Google.