Looking at https://gerrit.wikimedia.org/r/#/c/240614 , I notice ApiMain.php does not pass isError or the exception to logRequest(). So you can't tell from api.log if we're getting billions of bad and failing API requests.
Here are some actual api.log lines:
2015-09-24 21:42:48 mw1205 mediawikiwiki api INFO: API GET SPage_(WMF) 104.220.68.135 T=216ms action=parse page=Main_Page
2015-09-24 21:43:07 mw1206 mediawikiwiki api INFO: API GET SPage_(WMF) 104.220.68.135 T=206ms action=parse page=Justin_Timberlake
2015-09-24 21:58:28 mw1229 mediawikiwiki api INFO: API GET SPage_(WMF) 104.220.68.135 T=177ms action=parse text=Hello contentmodel=wikiwacky
You can't tell the second one failed with error.code: "missingtitle" and the third with "unknown_contentmodel".
The error is reflected in the custom HTTP response header
MediaWiki-API-Error: missingtitle
but we don't log that.
The fix is to log the API response's error.code the same way that it's output in the MediaWiki-API-Error header, maybe by passing an $error parameter to logRequest().