I'm trying to create a process for better understand what's happening in my code. I want to create metrics to automatically give my answers about simple or complex questions like:
- How many times a url was clicked? (how many requests arrived to a certain servlet method)
- How many times a certain user requested the same page?
- How many requests are pending in a queue on average?
and so on...
Is there an easy way to do this automatically and elegantly (for example - attribute like @CountHits would be great)?
I found this open source: http://metrics.codahale.com/getting-started/#reporting-via-jmx But it's too coupled to the code. Not so elegant :/