public ProcessorMetrics(IMetricScope metricScope, TimeSpan flushMetricsInterval) { EventProcessedCounter = metricScope.Counter(flushMetricsInterval, "event_processed"); EventIgnoredCounter = metricScope.Counter(flushMetricsInterval, "event_ignored"); EventFailedCounter = metricScope.Counter(flushMetricsInterval, "event_failed"); SendingErrorCounter = metricScope.Counter(flushMetricsInterval, "sending_errors"); }
public ReportHandler(string name, IMetricScope metricScope, ILog log) { Name = name; this.log = log; metricScope = metricScope.WithTag(MetricsTagNames.Operation, name); totalCounter = metricScope.Counter("total"); errorCounter = metricScope.Counter("errors"); }
public ProcessorHost(string consumerGroupHostId, string routingKey, IAirlockEventProcessor processor, ILog log, Consumer <Null, byte[]> consumer, IMetricScope metricScope, TimeSpan flushMetricsInterval, ProcessorHostSettings processorHostSettings) { this.routingKey = routingKey; this.processor = processor; this.log = log; this.consumer = consumer; this.processorHostSettings = processorHostSettings; AssignedPartitions = new int[0]; processorThread = new Thread(ProcessorThreadFunc) { IsBackground = true, Name = $"processor-{consumerGroupHostId}-{processor.ProcessorId}", }; queueGauge = metricScope.Gauge(flushMetricsInterval, "queue_size", () => eventsQueue.Count); pausedGauge = metricScope.Gauge(flushMetricsInterval, "paused", () => pausedPartitions != null ? 1 : 0); messageEnqueuedCounter = metricScope.Counter(flushMetricsInterval, "message_enqueued"); processorMetrics = new ProcessorMetrics(metricScope, flushMetricsInterval); }
public static ICounter Counter( this IMetricScope scope, string name) { return(scope.Counter(MetricClock.DefaultPeriod, name)); }
public AggregatorMetrics(IMetricScope metricScope) { MissedPastEvents = metricScope.Counter(1.Minutes(), "missed_past_events"); MissedFutureEvents = metricScope.Counter(1.Minutes(), "missed_future_events"); }