Open jyn514 opened 2 years ago
Thanks for creating this issue.
maybe this should be an issue in https://github.com/sile/rustracing instead?
Maybe.
Actually, I have created a PR https://github.com/sile/rustracing/pull/9 that seems to relate to this issue.
sile/rustracing#9 has no progress over one year. But I could restart the work if this PR (and another one that makes it possible to specify crossbeam
as an optional feature) would be worth you.
Hmm, https://github.com/sile/rustracing/pull/9/ is a different approach than I was thinking of, it allows sending with either Tokio or with crossbeam. But I was actually suggesting removing the "send" abstraction altogether - although now that I look at how the Span
drop impl is written I'm having trouble imagining how that would work ... @ObsidianMinor is the one who suggested the more flexible API originally, they might have ideas.
Right now,
Tracer
requires that you pass in a crossbeam channel. Because crossbeam is blocking, this makes it impossible to use rustracing_jaeger with an async application; you have to instead spawn a thread to avoid blocking the task. It would be nice to have the tracer just take spans directly, which lets the user decide whether they want to use threads or async (or just block on sending the span).(maybe this should be an issue in https://github.com/sile/rustracing instead?)