In order to be able of understand how the users are using a web application, which are the parts of the application with more stress and all that, I need to keep data about how the site is being used in a queryable way.
I would like to keep general data like:
- Requester IP address
- URL
- HTTP web method
- Request body length (if POST)
- Response body length.
- Request content type.
- Response content type.
- time that the operation has spent in total
- time that the operation has spent in the DB
- etc..
And also more precise data about internals cache hit/miss, special conditions, etc...
When you have just one server, and if the application is not big, a text file could do the trick. But if the amount of information is big, and/or you have several servers, another approach is needed, since you would like to merge this data.
What is the best approach in the ASP.NET world?
- Using a database? sql or nosql? would you use fire-and-forget asynchronous calls?
- Using a specialized monitoring application?
- Do you queue/buffer the log entries? how?
- Do you use custom performance counters?
Thanks.