Pass existing Context/Layer to Effect.runSync
Hi all,
I'm quite new to effect-ts and just stumbled across some oddity I do not fully understand.
I have a
To execute the request promises, I have the following code:
The spans above are pushed as expected, showing up in tempo.
However, the spans created in the following (
My best guess is that the context/layer of opentel is not shared the moment I call
Is this the correct assumption? If yes, how could I provide the same (?) context to the error handling effect?
Is the approach wrong in general?
Any advice would be highly appreciated, thanks in advance!
I'm quite new to effect-ts and just stumbled across some oddity I do not fully understand.
I have a
ConnectionManager that executes API requests with axios, where I provide the axios instance as a service.To execute the request promises, I have the following code:
The spans above are pushed as expected, showing up in tempo.
However, the spans created in the following (
handleCalloutErrorEff) snippet are not published:My best guess is that the context/layer of opentel is not shared the moment I call
Effect.runSync and the contexts are completely different.Is this the correct assumption? If yes, how could I provide the same (?) context to the error handling effect?
Is the approach wrong in general?
Any advice would be highly appreciated, thanks in advance!
