aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/test/scala/kamon/trace/RealSpanSpec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'kamon-core/src/test/scala/kamon/trace/RealSpanSpec.scala')
-rw-r--r--kamon-core/src/test/scala/kamon/trace/RealSpanSpec.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/kamon-core/src/test/scala/kamon/trace/RealSpanSpec.scala b/kamon-core/src/test/scala/kamon/trace/RealSpanSpec.scala
index 150bf4c7..e019e15a 100644
--- a/kamon-core/src/test/scala/kamon/trace/RealSpanSpec.scala
+++ b/kamon-core/src/test/scala/kamon/trace/RealSpanSpec.scala
@@ -88,16 +88,16 @@ class RealSpanSpec extends WordSpec with Matchers with BeforeAndAfterAll with Ev
}
}
- "pass all the tags, annotations and baggage to the FinishedSpan instance when started active and finished" in {
- val activeSpan = Kamon.buildSpan("full-span")
+ "pass all the tags, annotations and baggage to the FinishedSpan instance when started, activated and finished" in {
+ val scope = Kamon.activate(Kamon.buildSpan("full-span")
.withSpanTag("builder-string-tag", "value")
.withSpanTag("builder-boolean-tag-true", true)
.withSpanTag("builder-boolean-tag-false", false)
.withSpanTag("builder-number-tag", 42)
.withStartTimestamp(100)
- .startActive()
+ .start())
- activeSpan
+ Kamon.activeSpan()
.addBaggage("baggage", "value")
.addSpanTag("span-string-tag", "value")
.addSpanTag("span-boolean-tag-true", true)
@@ -110,7 +110,7 @@ class RealSpanSpec extends WordSpec with Matchers with BeforeAndAfterAll with Ev
.setOperationName("fully-populated-active-span")
.finish(200)
- activeSpan.deactivate()
+ scope.close()
eventually(timeout(2 seconds)) {
val finishedSpan = reporter.nextSpan().value