etishor/Metrics.NET

Annotation

solmetricchris opened this issue · 1 comments

Is there anyway we could add metrics support to a system via Annotations, as per the original java code.

For example adding a Gauge via Annotation:
https://github.com/dropwizard/metrics/blob/master/metrics-annotation/src/main/java/com/codahale/metrics/annotation/Gauge.java

Interesting idea. I'll investigate a few ways of doing this, but I'm not sure .net attributes provide enough functionality to implement this. It should be possible to implement on static methods, but I'm not sure if it is possible to "hook" into instance methods using attributes.