Issue Description
My service does a lot of async work via Broadway and Oban, and as such creates many child spans that end (and sometimes start) after the root/parent span finishes. I do not see these spans in Sentry at all.
It is extremely useful to be able to see all these spans together as a single trace, and other products like Honeycomb and Axiom support this behavior so I don't think it's unreasonable to request.
I believe the fix may be as simple as changing SpanProcessor.process_span to treat all spans whose parent doesn't exist in SpanStorage as a transaction root. However, I don't know how Sentry treats the results, so I'm not confident if that fix is enough on its own.
Reproduction Steps
parent_ctx =
Tracer.with_span "sync_root" do
:otel_ctx.get_current()
end
Task.async(fn ->
Process.sleep(25)
token = :otel_ctx.attach(parent_ctx)
try do
Tracer.with_span "async_parent" do
Tracer.with_span "async_child" do
Process.sleep(1)
end
end
after
:otel_ctx.detach(token)
end
end)
|> Task.await()
Expected Behavior
Two transactions should be reported with the same trace_id, appearing on the Sentry website as one trace with 3 spans.
Actual Behavior
Only sync_root is reported, and the trace on the Sentry website is completely missing the async spans.
Elixir Version
1.19.5
SDK Version
12.0.1
Integration and Its Version
No response
Sentry Config
No response
Issue Description
My service does a lot of async work via Broadway and Oban, and as such creates many child spans that end (and sometimes start) after the root/parent span finishes. I do not see these spans in Sentry at all.
It is extremely useful to be able to see all these spans together as a single trace, and other products like Honeycomb and Axiom support this behavior so I don't think it's unreasonable to request.
I believe the fix may be as simple as changing
SpanProcessor.process_spanto treat all spans whose parent doesn't exist in SpanStorage as a transaction root. However, I don't know how Sentry treats the results, so I'm not confident if that fix is enough on its own.Reproduction Steps
Expected Behavior
Two transactions should be reported with the same trace_id, appearing on the Sentry website as one trace with 3 spans.
Actual Behavior
Only
sync_rootis reported, and the trace on the Sentry website is completely missing the async spans.Elixir Version
1.19.5
SDK Version
12.0.1
Integration and Its Version
No response
Sentry Config
No response