Tracing Issue with Background Job in Effect and OpenTelemetry Setup
Hi everyone
I've setup opentelemetry on my http server.
I get traces correctly, however I'm running into an issue for one case:
In one of my endpoints, I need to trigger the run of a "background job".
I don't want to wait for the result of this job to return a response to the http client.
The issue is that traces created with withSpan("..") inside this background job are not visible.
I've simplified my issue to this snippet of code:
I'm a beginner with Effect and I've already spent a day trying to understand what I'm missing..
I'd really appreciate if someone can give me pointers to what I miss in my understanding.
Is it that layers provided to the parent fiber are not passed to the daemon fiber?
I'd like to find a solution where I can set the tracing layer just once.
Thanks !
I've setup opentelemetry on my http server.
I get traces correctly, however I'm running into an issue for one case:
In one of my endpoints, I need to trigger the run of a "background job".
I don't want to wait for the result of this job to return a response to the http client.
The issue is that traces created with withSpan("..") inside this background job are not visible.
I've simplified my issue to this snippet of code:
I'm a beginner with Effect and I've already spent a day trying to understand what I'm missing..
I'd really appreciate if someone can give me pointers to what I miss in my understanding.
Is it that layers provided to the parent fiber are not passed to the daemon fiber?
I'd like to find a solution where I can set the tracing layer just once.
Thanks !
