From 114918ea3932e5d45416e894838097208cce7c2c Mon Sep 17 00:00:00 2001 From: Ivan Topolnjak Date: Thu, 23 Nov 2017 01:43:34 +0100 Subject: add utility apis for easier usage of Spans in the current context --- kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kamon-core-tests') 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 92431470..eec5b428 100644 --- a/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala +++ b/kamon-core-tests/src/test/scala/kamon/trace/TracerSpec.scala @@ -65,7 +65,7 @@ class TracerSpec extends WordSpec with Matchers with SpanBuilding with SpanInspe "automatically take the Span from the current Context as parent" in { val parent = tracer.buildSpan("myOperation").start() - val child = Kamon.withContext(Context.create(Span.ContextKey, parent)) { + val child = Kamon.withSpan(parent) { tracer.buildSpan("childOperation").asChildOf(parent).start() } @@ -76,7 +76,7 @@ class TracerSpec extends WordSpec with Matchers with SpanBuilding with SpanInspe "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)) { + val child = Kamon.withSpan(parent) { tracer.buildSpan("childOperation").ignoreParentFromContext().start() } -- cgit v1.2.3