diff options
Diffstat (limited to 'kamon-statsd/src/main/scala/kamon/statsd')
-rw-r--r-- | kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala index 7676f97f..3dd25b74 100644 --- a/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala +++ b/kamon-statsd/src/main/scala/kamon/statsd/StatsD.scala @@ -25,6 +25,7 @@ import com.typesafe.config.Config import java.lang.management.ManagementFactory import akka.event.Logging import java.net.InetSocketAddress +import java.util.concurrent.TimeUnit.MILLISECONDS object StatsD extends ExtensionId[StatsDExtension] with ExtensionIdProvider { override def lookup(): ExtensionId[_ <: Extension] = StatsD @@ -42,9 +43,9 @@ class StatsDExtension(system: ExtendedActorSystem) extends Kamon.Extension { private val statsDConfig = system.settings.config.getConfig("kamon.statsd") val statsDHost = new InetSocketAddress(statsDConfig.getString("hostname"), statsDConfig.getInt("port")) - val flushInterval = statsDConfig.getMilliseconds("flush-interval") + val flushInterval = statsDConfig.getDuration("flush-interval", MILLISECONDS) val maxPacketSize = statsDConfig.getInt("max-packet-size") - val tickInterval = system.settings.config.getMilliseconds("kamon.metrics.tick-interval") + val tickInterval = system.settings.config.getDuration("kamon.metrics.tick-interval", MILLISECONDS) val statsDMetricsListener = buildMetricsListener(tickInterval, flushInterval) |