SpanOps#startUnmanaged
does not store a Span in Context
#293
Labels
tracing
Improvements to tracing module
SpanOps#startUnmanaged
does not store a Span in Context
#293
The follow-up to https://discord.com/channels/632277896739946517/1093154207328108634/1138014456278954014.
An example:
The span started by
startUnmanaged
isn't stored in a Vault. And from what I see, it's by design.The context management logic revolves around Local semantics. For example, another
SpanOps
API (e.g.def use[A](f: Span[F] => F[A]): F[A]
) has a fixed scope where the context can be manipulated.With
startUnmanaged
situation is different. If we try to set this span directly into theVault
it may outlive the 'scope' eventually, becausespan.end
does not reset the context.Let's assume we always store the active span in the Vault, the following example is problematic:
I would say, it adds more burden than benefits.
The text was updated successfully, but these errors were encountered: