public LogEventsMetrics Collect() =>
 new LogEventsMetrics(
     debugEvents.CollectAndReset(),
     infoEvents.CollectAndReset(),
     warnEvents.CollectAndReset(),
     errorEvents.CollectAndReset(),
     fatalEvents.CollectAndReset()
     );
Exemple #2
0
 public void Collect(CurrentProcessMetrics metrics)
 {
     if (!RuntimeDetector.IsDotNet50AndNewer)
     {
         return;
     }
     metrics.DnsLookupsCount       = lookupsCounter.CollectAndReset();
     metrics.FailedDnsLookupsCount = failedLookupsCounter.CollectAndReset();
 }
        public void Collect(CurrentProcessMetrics metrics)
        {
            if (!RuntimeDetector.IsDotNet50AndNewer)
            {
                return;
            }
            metrics.OutgoingTcpConnectionsCount = outgoingTcpConnectionsCounter.CollectAndReset();
            metrics.IncomingTcpConnectionsCount = incomingTcpConnectionsCounter.CollectAndReset();
            metrics.FailedTcpConnectionsCount   = failedTcpConnectionsCounter.CollectAndReset();

            metrics.OutgoingDatagramsCount = outgoingDatagramsCounter.Collect();
            metrics.IncomingDatagramsCount = incomingDatagramsCounter.Collect();
        }