diff --git a/conf/base.conf b/conf/base.conf index 2d36094fe6..639a7b8a4a 100644 --- a/conf/base.conf +++ b/conf/base.conf @@ -757,11 +757,49 @@ kamon { } } + influxdb { + hostname = "127.0.0.1" + port = 8086 + + # The maximum packet size for one POST request, set to 0 to disable batching + max-packet-size = 16384 + + # The protocol, either http or udp + protocol = "udb" + + # The measurements will be named ${application-name}-timers and -counters + application-name = "dev" + + # Allow users to override the name of the hostname reported by kamon. When changed, the hostname tag will be + # the value given here. + hostname-override = none + + # For histograms, which percentiles to count + percentiles = [50.0, 70.0, 90.0, 95.0, 99.0, 99.9] + + # Subscription patterns used to select which metrics will be pushed to InfluxDB. Note that first, metrics + # collection for your desired entities must be activated under the kamon.metrics.filters settings. + subscriptions { + histogram = [ "**" ] + min-max-counter = [ "**" ] + gauge = [ "**" ] + counter = [ "**" ] + trace = [ "**" ] + trace-segment = [ "**" ] + akka-actor = [ "**" ] + akka-dispatcher = [ "**" ] + akka-router = [ "**" ] + system-metric = [ "**" ] + http-server = [ "**" ] + } + } + modules { kamon-statsd { auto-start = no - requires-aspectj = no - extension-id = "kamon.statsd.StatsD" + } + kamon-influxdb { + auto-start = no } } } diff --git a/project/Build.scala b/project/Build.scala index 5bb9a41f8c..6b462d2fc0 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -35,7 +35,8 @@ object ApplicationBuild extends Build { scalaz, scalalib, hasher, config, apache, jgit, findbugs, reactivemongo.driver, reactivemongo.iteratees, akka.actor, akka.slf4j, spray.caching, maxmind, prismic, - kamon.core, kamon.statsd, java8compat, semver, scrimage), + kamon.core, kamon.statsd, kamon.influxdb, + java8compat, semver, scrimage), TwirlKeys.templateImports ++= Seq( "lila.game.{ Game, Player, Pov }", "lila.tournament.Tournament", @@ -70,7 +71,7 @@ object ApplicationBuild extends Build { libraryDependencies ++= provided( play.api, hasher, config, apache, jgit, findbugs, reactivemongo.driver, reactivemongo.iteratees, - kamon.core, kamon.statsd) + kamon.core, kamon.statsd, kamon.influxdb) ) aggregate (moduleRefs: _*) lazy val puzzle = project("puzzle", Seq( diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 451f42002b..ba461145b8 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -65,5 +65,6 @@ object Dependencies { val version = "0.6.3" val core = "io.kamon" %% "kamon-core" % version val statsd = "io.kamon" %% "kamon-statsd" % version + val influxdb = "io.kamon" %% "kamon-influxdb" % version } }