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); }
public void Dispose() { MetricClocks.Stop(); }