diff options
Diffstat (limited to 'kamon-jdbc/src')
-rw-r--r-- | kamon-jdbc/src/main/scala/kamon/jdbc/Jdbc.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kamon-jdbc/src/main/scala/kamon/jdbc/Jdbc.scala b/kamon-jdbc/src/main/scala/kamon/jdbc/Jdbc.scala index 036789b7..f66af7a6 100644 --- a/kamon-jdbc/src/main/scala/kamon/jdbc/Jdbc.scala +++ b/kamon-jdbc/src/main/scala/kamon/jdbc/Jdbc.scala @@ -15,7 +15,7 @@ package kamon.jdbc -import java.util.concurrent.TimeUnit.{ MILLISECONDS ⇒ milliseconds } +import kamon.util.ConfigTools.Syntax import akka.actor.{ ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider } import kamon.Kamon @@ -39,7 +39,7 @@ class JdbcExtension(system: ExtendedActorSystem) extends Kamon.Extension { private val sqlErrorProcessorClass = config.getString("sql-error-processor") private val sqlErrorProcessor: SqlErrorProcessor = system.dynamicAccess.createInstanceFor[SqlErrorProcessor](sqlErrorProcessorClass, Nil).get - val slowQueryThreshold = config.getDuration("slow-query-threshold", milliseconds) + val slowQueryThreshold = config.getFiniteDuration("slow-query-threshold").toMillis def processSlowQuery(sql: String, executionTime: Long) = slowQueryProcessor.process(sql, executionTime, slowQueryThreshold) def processSqlError(sql: String, ex: Throwable) = sqlErrorProcessor.process(sql, ex) |