otel4s icon indicating copy to clipboard operation
otel4s copied to clipboard

Experimental IOLocalContextStorage

Open rossabaker opened this issue 2 years ago • 10 comments

I think this is doomed, but putting it out there to continue the discussion in #202.

Edit by @NthPortal: it is not necessarily doomed

rossabaker avatar May 12 '23 16:05 rossabaker

Does it seamlessly propagate the context? At least from the examples, it seems it does.

iRevive avatar May 14 '23 19:05 iRevive

I don't think it works at all, because the dispatched fibers have their own IOLocal state. But typelevel/cats-effect#3636 may open a new path.

rossabaker avatar May 18 '23 02:05 rossabaker

6b542aa probably belongs on main for general cleanliness. The motivator here is that the Java SDK loads its own testkit if it's present, in preference to any other SPI implementation, like ours.

rossabaker avatar May 19 '23 04:05 rossabaker

This is going to want to live in an SPI module. Having more than one on the classpath is like multiple slf4j bindings.

rossabaker avatar May 19 '23 17:05 rossabaker

I just realised there's a small problem of this not being the same type of context used in the API of the java backend, and I'm not entirely sure how to deal with that

NthPortal avatar Aug 24 '23 18:08 NthPortal

so, with the new context implementation, if we use our own context and just have the custom ContextStorage unbox it, that should work fine. but we also need to expose access to a Local[F, Context] so that scala API users can access the context

NthPortal avatar Aug 25 '23 16:08 NthPortal

just want to drop a note that I've been working on this (with Ross' blessing), and have a working implementation with tests. there's just the teeny, tiny problem that it depends not just on an unreleased cats effect version but on one that's not even merged yet. so, uh. not sure quite what to do about that

NthPortal avatar Sep 28 '23 22:09 NthPortal

this is ready for review. I'm reluctant to mark it as not a draft however, until typelevel/cats-effect#3636 is merged

NthPortal avatar Oct 04 '23 19:10 NthPortal

@iRevive Has this been accidentally closed?

razvanz avatar May 15 '24 10:05 razvanz

@razvanz thanks for pointing out! I guess I linked the wrong task/PR, and it closed automatically.

iRevive avatar May 15 '24 11:05 iRevive

thanks for updating this @iRevive!

NthPortal avatar Dec 18 '24 01:12 NthPortal