Exemplo n.º 1
0
        public ProcessorMetricsDecorator(IProcessor <T> decoratee, string messageMetricName, double[] durationHistogramBuckets)
        {
            _decoratee         = decoratee;
            _durationHistogram = MetricsHelper.CreateHistogram(durationHistogramBuckets, GetHistogramLabelNames().ToArray(), messageMetricName,
                                                               "duration_seconds", "process");

            _counter = MetricsHelper.CreateCounter(GetCounterLabelNames().ToArray(), messageMetricName,
                                                   "total", "process");
        }
Exemplo n.º 2
0
 public PublisherMetricsDecorator(IPublisher <T> decoratee, string messageMetricsName)
 {
     _decoratee = decoratee;
     _counter   = MetricsHelper.CreateCounter(new[] { "type" }, messageMetricsName, "total", "publish");
 }