示例#1
0
 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");
 }
示例#2
0
 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");
 }
示例#3
0
 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));
 }
示例#5
0
 public AggregatorMetrics(IMetricScope metricScope)
 {
     MissedPastEvents   = metricScope.Counter(1.Minutes(), "missed_past_events");
     MissedFutureEvents = metricScope.Counter(1.Minutes(), "missed_future_events");
 }