1

This is probably the stupidest question, but I cannot find any answer in Google's own docs:

Question: Is there a way to view detailed error reports in Google's API console?

Details: I am using the Google Drive API to view and create files, and in the Google API console I can view metrics that show me error counts by API method, by response code, etc. But just knowing I have a bunch of "4xx" errors does not help me much, especially when the errors are sporadic. Is there any detailed logging available for the Google API that might help me see more specifically what went wrong when these errors popped up? It seems like this info should be somewhere (they bothered to make the nice plot showing when the errors occured, just no details on what the error was...) but I can't find how to access it.

Edit: To clarify, I am not asking how to log items myself, but how to access the existing logs generated by Google API Console.

Edit: My initial guess was to check the Google Logs Explorer, but everything in the Dashboard tab reports "No data is available for the selected time frame", and any queries I make appear to return empty.

Trevor Buckner
  • 480
  • 2
  • 11
  • Did you check in https://console.cloud.google.com/logs ? – Aerials Oct 26 '20 at 14:10
  • @Aerials Yes I have, but everything appears to be empty or blank. Looking at the "Logs Dashboard" tab, every chart says "No data is available for the selected time frame." When I type in any query within my project, there don't appear to be any results at all. I updated the OP to clarify this. – Trevor Buckner Oct 26 '20 at 18:03
  • Ok, please share the minimal code, which will reproduce your "4XX" errors so we can take a look. – Aerials Oct 28 '20 at 14:13
  • @Aerials Unfortunately, that is the precise reason for my question. I have no idea what in my app is causing the 4XX errors to generate. Out of 500,000 GET requests, I have had ~6,000 4XX errors (~98.75% success rate). I want to examine the logs at Google to find out what the full error was in those random rare occurences. – Trevor Buckner Oct 29 '20 at 02:47
  • Ok, where is your application being served from? And if you are receiving the error codes correctly from the Drive API, you should be able to parse the error message and log it in your server. What language are you using? – Aerials Oct 29 '20 at 08:55
  • @Aerials I am able to log items in my server (on Heroku), but the question here is not whether I can log items myself. While I appreciate your willingness to help, I'm afraid this is answering the wrong question. The question is "Is there a way to view detailed error reports *in Google's API console?*" Even if I add some detailed logging output for these errors, I still want to know how to (or if it is possible) to access logs from Google for future reference. It seems like they already have all of the statistics, times, etc., and I want to take advantage of that without duplicating it myself. – Trevor Buckner Oct 29 '20 at 16:46
  • Well I think that would be the Drive APIs backend at Google who are keeping these logs with the associated metadata, since it is their server processing your request. – Aerials Oct 29 '20 at 16:59
  • @Aerials Correct, which leads back to my original question: *How do I access those logs?* – Trevor Buckner Oct 29 '20 at 20:04
  • I don't believe they are public. – Aerials Oct 31 '20 at 08:39

0 Answers0