My application as an API, with which I do not control. I don’t know which users use it, how many times, etc.
What is the best way to make an analytics system track my API usage?
Thank!
Install a fast database such as Redis, and then start simple query tracking. Improve it.
You can use harmony proxies to wrap all your API objects in order to track general characteristics by creating a general-purpose proxy that intercepts function calls and redirects them to your actual api after recording the information you need.
https://github.com/isaacs/node-proxy/
http://wiki.ecmascript.org/doku.php?id=harmony:proxies