private static void AddMetrics(MetricsRegistry registry) { var name = "Test"; registry.Gauge(name, () => 0.0, Unit.Calls); registry.Counter(name, Unit.Calls); registry.Meter(name, Unit.Calls, TimeUnit.Seconds); registry.Histogram(name, Unit.Calls, SamplingType.FavourRecent); registry.Timer(name, Unit.Calls, SamplingType.FavourRecent, TimeUnit.Seconds, TimeUnit.Milliseconds); }
public ActiveRequestCounterMiddleware(MetricsRegistry registry, string metricName) { this.activeRequests = registry.Counter(metricName, Unit.Custom("ActiveRequests")); }