public override IInterceptor CreateInterceptor(IProxyRequest request) { if (meterInterceptor == null) { MetricName metricName = Utils.BuildName(request, Name, Absolute); MetricRegistry registry = request.Context.Kernel.Get<MetricRegistry>(); Meter meter = registry.Meter(metricName); Type t = typeof(Exception); if (ExceptionType!=null && ExceptionType.IsSubclassOf(t)) t = ExceptionType; meterInterceptor = new ExceptionMeteringInterceptor(meter, t); } return meterInterceptor; }
public override IInterceptor CreateInterceptor(IProxyRequest request) { if (meterInterceptor == null) { MetricName metricName = Utils.BuildName(request, Name, Absolute); MetricRegistry registry = request.Context.Kernel.Get <MetricRegistry>(); Meter meter = registry.Meter(metricName); Type t = typeof(Exception); if (ExceptionType != null && ExceptionType.IsSubclassOf(t)) { t = ExceptionType; } meterInterceptor = new ExceptionMeteringInterceptor(meter, t); } return(meterInterceptor); }