diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-12 11:30:06 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-13 05:15:30 +0100 |
commit | c6bb65535bcc3cc1ff3834a91473ee8dfa6145e8 (patch) | |
tree | d7dbe6a1007b168998f167ac74a98744542c6fa8 /kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala | |
parent | 6729c9632245328a007332cdcce7d362584d735a (diff) | |
download | Kamon-c6bb65535bcc3cc1ff3834a91473ee8dfa6145e8.tar.gz Kamon-c6bb65535bcc3cc1ff3834a91473ee8dfa6145e8.tar.bz2 Kamon-c6bb65535bcc3cc1ff3834a91473ee8dfa6145e8.zip |
! all: Kamon now works as a single instance in a companion object.
Diffstat (limited to 'kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala')
-rw-r--r-- | kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala b/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala index 795453d0..9e87da84 100644 --- a/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala +++ b/kamon-play/src/test/scala/kamon/play/WSInstrumentationSpec.scala @@ -17,8 +17,8 @@ package kamon.play import kamon.Kamon -import kamon.metric.{ Metrics, EntitySnapshot, TraceMetrics } -import kamon.trace.{ Tracer, TraceContext, SegmentCategory } +import kamon.metric.{ EntitySnapshot, TraceMetrics } +import kamon.trace.{ TraceContext, SegmentCategory } import org.scalatest.{ Matchers, WordSpecLike } import org.scalatestplus.play.OneServerPerSuite import play.api.libs.ws.WS @@ -26,12 +26,12 @@ import play.api.mvc.Action import play.api.mvc.Results.Ok import play.api.test.Helpers._ import play.api.test._ -import play.libs.Akka import scala.concurrent.Await import scala.concurrent.duration._ class WSInstrumentationSpec extends WordSpecLike with Matchers with OneServerPerSuite { + Kamon.start() import kamon.metric.TraceMetricsSpec.SegmentSyntax System.setProperty("config.file", "./kamon-play/src/test/resources/conf/application.conf") @@ -66,11 +66,11 @@ class WSInstrumentationSpec extends WordSpecLike with Matchers with OneServerPer } def newContext(name: String): TraceContext = - Kamon(Tracer)(Akka.system).newContext(name) + Kamon.tracer.newContext(name) def takeSnapshotOf(traceName: String): EntitySnapshot = { - val recorder = Kamon(Metrics)(Akka.system()).register(TraceMetrics, traceName).get.recorder - val collectionContext = Kamon(Metrics)(Akka.system()).buildDefaultCollectionContext + val recorder = Kamon.metrics.register(TraceMetrics, traceName).get.recorder + val collectionContext = Kamon.metrics.buildDefaultCollectionContext recorder.collect(collectionContext) } |