natchez
natchez copied to clipboard
Do not activate span since thread-local propagation does not work correctly when using cats-effect
As mentioned in https://github.com/typelevel/natchez/pull/1186#issuecomment-3020004700 we should not be activating spans on thread local by default. This is incorrect when using IO.
The only safe way to do this is explicitly as in https://github.com/typelevel/natchez/pull/1189.
Not activating spans is also consistent with other backends like OpenTelemetry.
Any chance of getting this merged?
Perhaps if it's a Span.Options parameter? It'd also have to be ported to other backends. I think it's OK to roll with it as long as it's opt-in.