NodeJS - How to monitor “visits” or calls to my API?
NodeJS - How to monitor “visits” or calls to my API?
Recently I have developed a RESTful API, and I would like to know about a convinient way of detecting the number of calls to it?
Tried to look for such functionality at Google Analytics (to implement a call being shot upon every visit with my account ID to analytics) but couldn't find one?
As I believe API visiting / overloading is something common to monitor (just like a website), I am addressing Stackoverflow to try and find the answer for that?
Thank you!
With API keys. If you don't have API keys, you won't be able to do this efficiently - as with website analytics.
– estus
Aug 29 at 0:22
Thank you Bagus, will try. estus - API keys? My API keys of Google Analytics?
– StackMaster
Aug 29 at 0:30
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
easy: use web server before your node.js api, then extract the access log with something like log parser to query the log for statistics. medium: use api gateway, like Kong probably - havent tried myself. hard: develop your own thin layer before the actual api implementation - your api may chocked when it try to update the statistics, especially if you increment a column on db.
– Bagus Tesa
Aug 29 at 0:04