diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 01:47:32 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 01:47:32 +0100 |
commit | 81c52c27d2b4784d561ae63b884b6e8c9e03db58 (patch) | |
tree | 1414f438c83976d60e98d27041ec3c177094881e /kamon-newrelic/src/main/scala/kamon/newrelic/Agent.scala | |
parent | a313e1e94b1f8a660e24a47f7f76a28a97dad8ff (diff) | |
download | Kamon-81c52c27d2b4784d561ae63b884b6e8c9e03db58.tar.gz Kamon-81c52c27d2b4784d561ae63b884b6e8c9e03db58.tar.bz2 Kamon-81c52c27d2b4784d561ae63b884b6e8c9e03db58.zip |
= all: stop using config.getDuration in favor of config.getFiniteDuration.
Diffstat (limited to 'kamon-newrelic/src/main/scala/kamon/newrelic/Agent.scala')
-rw-r--r-- | kamon-newrelic/src/main/scala/kamon/newrelic/Agent.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kamon-newrelic/src/main/scala/kamon/newrelic/Agent.scala b/kamon-newrelic/src/main/scala/kamon/newrelic/Agent.scala index aa6aed3b..e65b2460 100644 --- a/kamon-newrelic/src/main/scala/kamon/newrelic/Agent.scala +++ b/kamon-newrelic/src/main/scala/kamon/newrelic/Agent.scala @@ -16,8 +16,6 @@ package kamon.newrelic -import java.util.concurrent.TimeUnit.{ MILLISECONDS ⇒ milliseconds } - import akka.actor.{ ActorLogging, Actor } import akka.io.IO import akka.util.Timeout @@ -28,11 +26,13 @@ import scala.concurrent.Future import spray.httpx.SprayJsonSupport import spray.json.lenses.JsonLenses._ import java.lang.management.ManagementFactory -import scala.concurrent.duration._ +import kamon.util.ConfigTools.Syntax import Agent._ import JsonProtocol._ import akka.pattern.pipe +import scala.concurrent.duration.FiniteDuration + class Agent extends Actor with SprayJsonSupport with ActorLogging { import context.dispatcher @@ -136,9 +136,9 @@ object AgentSettings { newRelicConfig.getString("app-name"), runtimeName(1), runtimeName(0).toInt, - Timeout(newRelicConfig.getDuration("operation-timeout", milliseconds).millis), + Timeout(newRelicConfig.getFiniteDuration("operation-timeout")), newRelicConfig.getInt("max-connect-retries"), - FiniteDuration(newRelicConfig.getDuration("connect-retry-delay", milliseconds), milliseconds), - newRelicConfig.getDuration("apdexT", milliseconds) / 1E3D) + newRelicConfig.getFiniteDuration("connect-retry-delay"), + newRelicConfig.getFiniteDuration("apdexT").toMillis / 1E3D) } }
\ No newline at end of file |