diff options
Diffstat (limited to 'kamon-statsd/src/main/scala/kamon/statsd')
-rw-r--r-- | kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala index 2cc9c0c8..1b3daa97 100644 --- a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala +++ b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala @@ -61,6 +61,12 @@ class StatsDExtension(system: ExtendedActorSystem) extends Kamon.Extension { Kamon(Metrics)(system).subscribe(TraceMetrics, tracePathPattern, statsDMetricsListener, permanently = true) } + // Subscribe to Dispatchers + val includedDispatchers = statsDConfig.getStringList("includes.dispatcher").asScala + for (dispatcherPathPattern ← includedDispatchers) { + Kamon(Metrics)(system).subscribe(DispatcherMetrics, dispatcherPathPattern, statsDMetricsListener, permanently = true) + } + def buildMetricsListener(tickInterval: Long, flushInterval: Long): ActorRef = { assert(flushInterval >= tickInterval, "StatsD flush-interval needs to be equal or greater to the tick-interval") |