Skip to content

Commit

Permalink
Clarify span names
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Dec 14, 2022
1 parent 2ed398f commit 0192f43
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/core/shared/src/test/scala/SpanPropagationTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ class SpanPropagationTest extends InMemorySuite {
"spanR",
new TraceTest {
def program[F[_]: MonadCancelThrow: Trace] =
Trace[F].spanR("parent").use { f =>
Trace[F].span("child")(
Trace[F].spanR("spanR").use { f =>
Trace[F].span("span")(
f(Trace[F].put("question" -> "ultimate")) *> Trace[F].put("answer" -> 42)
)
}

def expectedHistory = List(
(Lineage.Root, NatchezCommand.CreateRootSpan("root", Kernel(Map()))),
(Lineage.Root, NatchezCommand.CreateSpan("parent", None)),
(Lineage.Root, NatchezCommand.CreateSpan("child", None)),
(Lineage.Root / "parent", NatchezCommand.Put(List("question" -> "ultimate"))),
(Lineage.Root / "child", NatchezCommand.Put(List("answer" -> 42))),
(Lineage.Root, NatchezCommand.ReleaseSpan("child")),
(Lineage.Root, NatchezCommand.ReleaseSpan("parent")),
(Lineage.Root, NatchezCommand.CreateSpan("spanR", None)),
(Lineage.Root, NatchezCommand.CreateSpan("span", None)),
(Lineage.Root / "spanR", NatchezCommand.Put(List("question" -> "ultimate"))),
(Lineage.Root / "span", NatchezCommand.Put(List("answer" -> 42))),
(Lineage.Root, NatchezCommand.ReleaseSpan("span")),
(Lineage.Root, NatchezCommand.ReleaseSpan("spanR")),
(Lineage.Root, NatchezCommand.ReleaseRootSpan("root"))
)
}
Expand Down

0 comments on commit 0192f43

Please sign in to comment.