コード例 #1
0
        public ConsumerMetrics(TimeSpan flushMetricsInterval, IMetricScope rootMetricScope)
        {
            statScope       = rootMetricScope.WithTag(MetricsTagNames.Type, "libstat");
            processorsScope = rootMetricScope.WithTag(MetricsTagNames.Type, "processors");
            hostScope       = rootMetricScope.WithTag(MetricsTagNames.Type, "grouphost");
            var errorsScope = rootMetricScope.WithTag(MetricsTagNames.Type, "error");

            CriticalErrorCounter = errorsScope.Counter(flushMetricsInterval, "critical");
            ConsumeErrorCounter  = errorsScope.Counter(flushMetricsInterval, "consume");
            MetricClocks.Get(flushMetricsInterval).Register(WriteMetrics);
        }
コード例 #2
0
 public void Dispose()
 {
     MetricClocks.Stop();
 }