Base solution for your next web application
Open Closed

How to implement WebApi measuring? #2009


User avatar
0
ddnils created

I would like to know how I may go on to measure/count WebApi calls from my clients.

My plan is to get some data on how often my different WebApi-Endpoints are visited and possibly by whom.

Say I have a people WebApi - /person/id and beyond that /person/address and /person/pets I would like to know how frequent these APIs are visited by those who use my WebApi. One of my "clients" is a mobile App, and possibly I will be getting more clients. I even consider giving them keys (like google is doing). So I would count Api-Calls per client-key.

Any ideas on the matter would be most appreciated.


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Are you using audit logging (enabled by default)? It automatically logs every call to a web api including client information and execution duration. You can even add custom data. See doc: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Audit-Logging">http://www.aspnetboilerplate.com/Pages/ ... it-Logging</a>