I want create some type of ASP.NET (C# 2.0) Metrics class to help monitor the performance of a production web application. I am somewhat familiar with the 2.0 Health Monitoring and that is not what I am looking for (I don't think anyway). I would rather have a dashboard that gives me a snap shot as opposed a log or list of events. I would appreciate any feedback from the community. So even if you don't have a specific answer, feel free to add your input to any part and don't feel like you have to provide input on the whole thing. Thanks in advance!
Below are some of the things I would like to monitor. Values should be specific to the application and not IIS.
- Number of open sessions
- Hits per hour
- Oldest session
- Amount of allocated memory and usage
- **Average runtime spent in each (or a given) function.
- Last exception (handled or un-handled)
- Bandwidth utilization (is that even possible at the application level?)
**For number 5, I was thinking about using some type of stopwatch class. Each function I want to monitor will call start/stop as it begins and ends its execution. However that seems horribly ugly to me. Is there a way to do this without a stopwatch class? Can something in the Reflections class help with this?
Does something like this already exist? I have done a fair amount of Googling but can't find exactly what I am looking for.
Can you recommend any other metrics I should look at?