etishor / Metrics.NET

The Metrics.NET library provides a way of instrumenting applications with custom metrics (timers, histograms, counters etc) that can be reported in various ways and can provide insights on what is happening inside a running application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Annotation

solmetricchris opened this issue · 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.