natchez icon indicating copy to clipboard operation
natchez copied to clipboard

Add utilities for converting Kleisli[F, Span[F], A] to F[A]

Open mpilquist opened this issue 4 years ago • 0 comments

Use cases:

  • Span.dropTracing: Given some def mkFoo[F[_]: Trace]: F[Foo[F]], I don't want to trace the creation of Foo: Span.dropTracing.apply(mkFoo[Kliesli[F, Span[F], *]])
  • Span.rootTracing: Given a Stream[Kleisli[F, Span[F], A], convert to a Stream[F, A], but don't create a root span for each effect encountered, or otherwise "background" stuff ends up creating empty root spans. stream.mapK(Span.rootTracing) ends up creating a root span for the first call to Span#span

mpilquist avatar May 28 '21 15:05 mpilquist