diff options
author | Diego <diegolparra@gmail.com> | 2014-08-29 03:14:50 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-08-29 03:14:50 -0300 |
commit | 6fe0f1294a53d45e6c1b863f32fe22f3a641d25c (patch) | |
tree | c0359a5565064913780332be4eb29512344cc79b /kamon-statsd/src/main | |
parent | 84693938039935b94e80dd514820f1e728bbb77e (diff) | |
download | Kamon-6fe0f1294a53d45e6c1b863f32fe22f3a641d25c.tar.gz Kamon-6fe0f1294a53d45e6c1b863f32fe22f3a641d25c.tar.bz2 Kamon-6fe0f1294a53d45e6c1b863f32fe22f3a641d25c.zip |
+ statsd: include router metrics
Diffstat (limited to 'kamon-statsd/src/main')
-rw-r--r-- | kamon-statsd/src/main/resources/reference.conf | 1 | ||||
-rw-r--r-- | kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/kamon-statsd/src/main/resources/reference.conf b/kamon-statsd/src/main/resources/reference.conf index c7229234..522f9ca9 100644 --- a/kamon-statsd/src/main/resources/reference.conf +++ b/kamon-statsd/src/main/resources/reference.conf @@ -22,6 +22,7 @@ kamon { actor = [ "*" ] trace = [ "*" ] dispatcher = [ "*" ] + router = [ "*" ] } # Enable system metrics diff --git a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala index a8d8ae48..9c1ccbb0 100644 --- a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala +++ b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala @@ -65,6 +65,12 @@ class StatsDExtension(system: ExtendedActorSystem) extends Kamon.Extension { Kamon(Metrics)(system).subscribe(ActorMetrics, actorPathPattern, statsDMetricsListener, permanently = true) } + // Subscribe to Routers + val includedRouters = statsDConfig.getStringList("includes.router").asScala + for (routerPathPattern ← includedRouters) { + Kamon(Metrics)(system).subscribe(RouterMetrics, routerPathPattern, statsDMetricsListener, permanently = true) + } + // Subscribe to Traces val includedTraces = statsDConfig.getStringList("includes.trace").asScala for (tracePathPattern ← includedTraces) { |