diff options
author | Diego <diegolparra@gmail.com> | 2014-10-26 17:29:28 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-10-26 17:29:28 -0300 |
commit | 7b3928c881c85152bee88019da9d76a0cfa5359f (patch) | |
tree | 75eaf6d7e0f9aca913408daf6d0d11ac381ce1b9 /kamon-log-reporter/src/main/scala | |
parent | ff618be49e761b7b646c70f56909e715ecf86a00 (diff) | |
download | Kamon-7b3928c881c85152bee88019da9d76a0cfa5359f.tar.gz Kamon-7b3928c881c85152bee88019da9d76a0cfa5359f.tar.bz2 Kamon-7b3928c881c85152bee88019da9d76a0cfa5359f.zip |
= log-reporter: reduce verbosity of user metrics
Diffstat (limited to 'kamon-log-reporter/src/main/scala')
-rw-r--r-- | kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala b/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala index 0f8313f8..fd76f50c 100644 --- a/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala +++ b/kamon-log-reporter/src/main/scala/kamon/logreporter/LogReporter.scala @@ -26,8 +26,6 @@ import kamon.metric.UserMetrics._ import kamon.metric._ import kamon.metric.instrument.{ Counter, Histogram } import kamon.metrics.ContextSwitchesMetrics.ContextSwitchesMetricsSnapshot -import kamon.metrics.GCMetrics.GCMetricSnapshot -import kamon.metrics.MemoryMetrics.MemoryMetricSnapshot import kamon.metrics.NetworkMetrics.NetworkMetricSnapshot import kamon.metrics.ProcessCPUMetrics.ProcessCPUMetricsSnapshot import kamon.metrics._ @@ -248,6 +246,12 @@ class LogReporterSubscriber extends Actor with ActorLogging { def logUserMetrics(histograms: Map[MetricGroupIdentity, Histogram.Snapshot], counters: Map[MetricGroupIdentity, Counter.Snapshot], minMaxCounters: Map[MetricGroupIdentity, Histogram.Snapshot], gauges: Map[MetricGroupIdentity, Histogram.Snapshot]): Unit = { + + if (histograms.isEmpty && counters.isEmpty && minMaxCounters.isEmpty && gauges.isEmpty) { + log.info("No user metrics reported") + return + } + val userMetricsData = StringBuilder.newBuilder userMetricsData.append( |