HACKER Q&A
📣 aarreedd

How to Log API Usage Statistics?


I am looking for a tool or service to track API usage on my website. I'm not exactly sure what to search for and the results are so over SEO'ed it's impossible to figure out.

I need to see a graph of the number of API requests over time and filter by user id, IP address, http response code, endpoint used, and resource requested.

Ideally below the graph there would be a list of the actual API requests, metadata, and responses.

I would also like a way to see the distribution of API response times.

I have looked at ELK stack, AWS CloudWatch Metrics, DataDog, PaperTrail, Sentry. None of these quite seem to do what I want.

Any suggestions?


  👤 jamesfinlayson Accepted Answer ✓
In a previous job an ELK stack has done that, though I think that Filebeat was the missing step - it pulled all of that information out of nginx and application log files and fed it into an ELK stack.

👤 wizwit999
Check out https://www.moesif.com, if youre interested in analytics. If you're interested in the audit logging /security angle, also check out https://apptrail.com (Disclaimer: founder).

👤 ponyous
prometheus + grafana is the standard stack we use for API timings and general API performance monitoring