Open fiadliel opened 6 years ago
(I was working on this idea independently, before I found your project. It can still be done as a separate project if you don't see it fitting into your one.)
I love the idea and I think this is related to https://github.com/Sebruck/opencensus-scala/issues/23
Would you like to contribute somethings? Otherwise @yannick-cw and me will for sure pick this up and build something as soon as we have time.
I have some local code, I'll try and submit a PR in the next few days.
I'd been thinking about this for a while, coming from the position of how gRPC manages context: I'm pretty sure that we need to use lexical scope when dealing with async APIs (grpc-java uses ThreadLocal
values by default, which don't interoperate well in async world, considering the various thread pools callbacks can be executed on). Monix is better than most in this area (with TaskLocal
), but I don't want a solution which is restricted to that library.
I've also used New Relic quite a bit, and seen how even the best efforts to automatically instrument code by bytecode injection doesn't really work out that reliably.
Awesome, I was thinking in a similar direction for the api, but you seem to put in already way more thought. I am very interested in what you come up with and willing to review / support any time :)
Hi, would you be interested in code to make it easier to work with tagless-final style FP programming, and with cats-effect (FP effect monad)?
The current tracing API is designed for
Future
users, and isn't very idiomatic for FP.I would be thinking of something like:
An API for Span
e.g.
An API for creating spans
e.g.
An API for trace propagation which is similar to
Kleisli
, i.e. a wrapper aroundSpan[F] => F[A]
e.g.
An implementation of
Trace
for theSync
typeclass (this providesmap
,flatMap
,pure
,delay
, etc.)e.g.