diff options
Diffstat (limited to 'kamon-play/src/main/scala/kamon/play/Play.scala')
-rw-r--r-- | kamon-play/src/main/scala/kamon/play/Play.scala | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/kamon-play/src/main/scala/kamon/play/Play.scala b/kamon-play/src/main/scala/kamon/play/Play.scala index 9e160d58..270d244f 100644 --- a/kamon-play/src/main/scala/kamon/play/Play.scala +++ b/kamon-play/src/main/scala/kamon/play/Play.scala @@ -36,13 +36,7 @@ class PlayExtension(private val system: ExtendedActorSystem) extends Kamon.Exten log.info(s"Starting the Kamon(Play) extension") private val config = system.settings.config.getConfig("kamon.play") - val httpServerMetrics = { - val metricsExtension = Kamon.metrics - val factory = metricsExtension.instrumentFactory(HttpServerMetrics.category) - val entity = Entity("play-server", HttpServerMetrics.category) - - metricsExtension.register(entity, new HttpServerMetrics(factory)).recorder - } + val httpServerMetrics = Kamon.metrics.entity(HttpServerMetrics, "play-server") val defaultDispatcher = system.dispatcher val includeTraceToken: Boolean = config.getBoolean("automatic-trace-token-propagation") |