diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2017-08-18 12:29:20 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2017-08-18 12:29:20 +0200 |
commit | 3cb974e5dfd381b9b28ffef9977047cf35242121 (patch) | |
tree | bbd7562fb10095a7e50150211af2b5827949468c /kamon-core-tests/src/test/scala | |
parent | 5e0b768f139fc2c5e75d6b5060bd4d0aa48092b0 (diff) | |
download | Kamon-3cb974e5dfd381b9b28ffef9977047cf35242121.tar.gz Kamon-3cb974e5dfd381b9b28ffef9977047cf35242121.tar.bz2 Kamon-3cb974e5dfd381b9b28ffef9977047cf35242121.zip |
remove references to ActiveSpan
Diffstat (limited to 'kamon-core-tests/src/test/scala')
-rw-r--r-- | kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala | 2 | ||||
-rw-r--r-- | kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala b/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala index ae0c7795..3d292134 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/SpanMetrics.scala @@ -1,8 +1,6 @@ package kamon.trace -import kamon.Kamon import kamon.Kamon.buildSpan -import kamon.metric._ import kamon.testkit.{MetricInspection, Reconfigure} import org.scalatest.{Matchers, WordSpecLike} diff --git a/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala b/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala index fb5bb313..b398ee98 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala @@ -21,6 +21,7 @@ class TracerSpec extends WordSpec with Matchers with SpanBuilding with OptionVal "pass the operation name and tags to started Span" in { val span = tracer.buildSpan("myOperation") + .withTag("both", "both") .withMetricTag("metric-tag", "value") .withMetricTag("metric-tag", "value") .withSpanTag("hello", "world") @@ -32,16 +33,18 @@ class TracerSpec extends WordSpec with Matchers with SpanBuilding with OptionVal val spanData = inspect(span) spanData.operationName() shouldBe "myOperation" spanData.metricTags() should contain only ( - ("metric-tag" -> "value")) + ("metric-tag" -> "value"), + ("both" -> "both")) spanData.spanTags() should contain allOf( + ("both" -> TagValue.String("both")), ("hello" -> TagValue.String("world")), ("kamon" -> TagValue.String("rulez")), ("number" -> TagValue.Number(123)), ("boolean" -> TagValue.True)) } - "not have any parent Span if there is ActiveSpan and no parent was explicitly given" in { + "not have any parent Span if there is no Span in the current context and no parent was explicitly given" in { val span = tracer.buildSpan("myOperation").start() val spanData = inspect(span) spanData.context().parentID shouldBe IdentityProvider.NoIdentifier @@ -59,10 +62,10 @@ class TracerSpec extends WordSpec with Matchers with SpanBuilding with OptionVal parentData.context().spanID shouldBe childData.context().parentID } - "ignore the currently active span as parent if explicitly requested" in { + "ignore the span from the current context as parent if explicitly requested" in { val parent = tracer.buildSpan("myOperation").start() val child = Kamon.withContext(Context.create(Span.ContextKey, parent)) { - tracer.buildSpan("childOperation").ignoreActiveSpan().start() + tracer.buildSpan("childOperation").ignoreParentFromContext().start() } val childData = inspect(child) |