From 9bdb042fc802fbed07ac428dfe10405da638e86e Mon Sep 17 00:00:00 2001 From: Diego Date: Fri, 1 Apr 2016 01:52:41 -0300 Subject: Add tags for traces and closes #327 --- kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'kamon-core/src/test/scala/kamon/testkit') diff --git a/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala b/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala index f23d974c..497cb77d 100644 --- a/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala +++ b/kamon-core/src/test/scala/kamon/testkit/BaseKamonSpec.scala @@ -20,8 +20,8 @@ import akka.testkit.{ ImplicitSender, TestKitBase } import akka.actor.ActorSystem import com.typesafe.config.{ Config, ConfigFactory } import kamon.Kamon -import kamon.metric.{ Entity, SubscriptionsDispatcher, EntitySnapshot } -import kamon.trace.TraceContext +import kamon.metric.{ Entity, EntitySnapshot, SubscriptionsDispatcher } +import kamon.trace.{ TraceContext, Tracer } 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) -- cgit v1.2.3