diff options
author | Diego <diegolparra@gmail.com> | 2014-05-21 21:02:08 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-05-21 21:13:25 -0300 |
commit | bcba7829a885813b0f67e396faf044cda14a798f (patch) | |
tree | 37b202d093ab1215cd3c69c4fe168463de4d1529 /kamon-datadog/src/main/scala/kamon/datadog | |
parent | e4f00e3bf09990a81c02d51e0118524e675fd410 (diff) | |
download | Kamon-bcba7829a885813b0f67e396faf044cda14a798f.tar.gz Kamon-bcba7829a885813b0f67e396faf044cda14a798f.tar.bz2 Kamon-bcba7829a885813b0f67e396faf044cda14a798f.zip |
+ datadog: include dispatchers metrics
Diffstat (limited to 'kamon-datadog/src/main/scala/kamon/datadog')
-rw-r--r-- | kamon-datadog/src/main/scala/kamon/datadog/Datadog.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kamon-datadog/src/main/scala/kamon/datadog/Datadog.scala b/kamon-datadog/src/main/scala/kamon/datadog/Datadog.scala index c6981fd7..a323af78 100644 --- a/kamon-datadog/src/main/scala/kamon/datadog/Datadog.scala +++ b/kamon-datadog/src/main/scala/kamon/datadog/Datadog.scala @@ -60,6 +60,12 @@ class DatadogExtension(system: ExtendedActorSystem) extends Kamon.Extension { Kamon(Metrics)(system).subscribe(TraceMetrics, tracePathPattern, datadogMetricsListener, permanently = true) } + // Subscribe to Dispatchers + val includedDispatchers = datadogConfig.getStringList("includes.dispatcher").asScala + for (dispatcherPathPattern ← includedDispatchers) { + Kamon(Metrics)(system).subscribe(DispatcherMetrics, dispatcherPathPattern, datadogMetricsListener, permanently = true) + } + def buildMetricsListener(tickInterval: Long, flushInterval: Long): ActorRef = { assert(flushInterval >= tickInterval, "Datadog flush-interval needs to be equal or greater to the tick-interval") |