diff options
Diffstat (limited to 'kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala')
-rw-r--r-- | kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala b/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala index f23d974c..78c8607b 100644 --- a/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala +++ b/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala @@ -16,11 +16,11 @@ package kamon.testkit -import akka.testkit.{ ImplicitSender, TestKitBase } import akka.actor.ActorSystem -import com.typesafe.config.{ Config, ConfigFactory } +import akka.testkit.{ ImplicitSender, TestKitBase } +import com.typesafe.config.Config import kamon.Kamon -import kamon.metric.{ Entity, SubscriptionsDispatcher, EntitySnapshot } +import kamon.metric.{ Entity, EntitySnapshot, SubscriptionsDispatcher } import kamon.trace.TraceContext import kamon.util.LazyActorRef import org.scalatest.{ BeforeAndAfterAll, Matchers, WordSpecLike } @@ -41,6 +41,9 @@ abstract class BaseKamonSpec(actorSystemName: String) extends TestKitBase with W def newContext(name: String, token: String): TraceContext = Kamon.tracer.newContext(name, Option(token)) + def newContext(name: String, token: String, tags: Map[String, String]): TraceContext = + Kamon.tracer.newContext(name, Option(token), tags) + def takeSnapshotOf(name: String, category: String): EntitySnapshot = { val recorder = Kamon.metrics.find(name, category).get recorder.collect(collectionContext) |