-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure async runtime in Rust code instead of cargo feature #481
Conversation
a01e3bb
to
3c9c1d8
Compare
Might need an empty commit to nudge the EasyCLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @djc additional comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, LGTM!
I'm going to test the examples now to make sure they all still work |
Result:
From my side this is ready to be merged. |
Configure the async runtime (Tokio, async-std, ...) in Rust using `with_runtime(runtime)` on the trace pipeline builders instead of using cargo features. The main advantages of using Rust code is that cargo doesn't have a way of describing mutually exclusive features at the moment. We currently fall back to Tokio if multiple runtime features are enabled. This can be confusing, especially if a runtime feature is enabled by another crate. Choosing the runtime in Rust code means the entire trace pipeline configuration is in one place.
- Remove `()` runtime implementation - Replace `install` function with `install_simple` and `install_batch`
Extracted from #469.
Configure the async runtime (Tokio, async-std, ...) in Rust using
install_batch(runtime)
on the trace pipeline builders instead of using cargo features.The main advantages of using Rust code is that cargo doesn't have a way of describing mutually exclusive features at the moment. We currently fall back to Tokio if multiple runtime features are enabled. This can be confusing, especially if a runtime feature is enabled by another crate.
Choosing the runtime in Rust code means the entire trace pipeline configuration is in one place.
With this:
rt-*
cargo features can be enabled at the same time. The only downside of enabling more features is a longer build time.Runtime
trait or useinstall_simple()
to use the simple span processor.Examples: