diff --git a/sentry-core/src/futures.rs b/sentry-core/src/futures.rs index 185be3c2..c1672160 100644 --- a/sentry-core/src/futures.rs +++ b/sentry-core/src/futures.rs @@ -48,7 +48,7 @@ where } /// Future extensions for Sentry. -pub trait FutureExt: Sized { +pub trait SentryFutureExt: Sized { /// Binds a hub to the execution of this future. /// /// This ensures that the future is polled within the given hub. @@ -63,12 +63,12 @@ pub trait FutureExt: Sized { } } -impl FutureExt for F where F: Future {} +impl SentryFutureExt for F where F: Future {} #[cfg(all(test, feature = "test"))] mod tests { use crate::test::with_captured_events; - use crate::{capture_message, configure_scope, FutureExt, Hub, Level}; + use crate::{capture_message, configure_scope, Hub, Level, SentryFutureExt}; use tokio::runtime::Runtime; #[test] diff --git a/sentry-core/src/lib.rs b/sentry-core/src/lib.rs index 8f384392..65a95a7f 100644 --- a/sentry-core/src/lib.rs +++ b/sentry-core/src/lib.rs @@ -73,13 +73,19 @@ pub use crate::api::*; pub use crate::breadcrumbs::IntoBreadcrumbs; pub use crate::clientoptions::ClientOptions; pub use crate::error::{capture_error, event_from_error, parse_type_from_debug}; -pub use crate::futures::{FutureExt, SentryFuture as Future}; +pub use crate::futures::{SentryFuture, SentryFutureExt}; pub use crate::hub::Hub; pub use crate::integration::Integration; pub use crate::intodsn::IntoDsn; pub use crate::scope::{Scope, ScopeGuard}; pub use crate::transport::{Transport, TransportFactory}; +// deprecated exports +#[deprecated = "The export was renamed to `SentryFuture`"] +pub use crate::futures::SentryFuture as Future; +#[deprecated = "The export was renamed to `SentryFutureExt`"] +pub use crate::futures::SentryFutureExt as FutureExt; + // client feature #[cfg(feature = "client")] mod client; diff --git a/sentry/Cargo.toml b/sentry/Cargo.toml index d15cbadc..959133b1 100644 --- a/sentry/Cargo.toml +++ b/sentry/Cargo.toml @@ -28,6 +28,7 @@ anyhow = ["sentry-anyhow"] debug-images = ["sentry-debug-images"] error-chain = ["sentry-error-chain"] log = ["sentry-log"] +env_logger = ["sentry-log", "sentry-log/env_logger"] slog = ["sentry-slog"] # other features test = ["sentry-core/test"] diff --git a/sentry/src/lib.rs b/sentry/src/lib.rs index 9d6163a1..56c71ca5 100644 --- a/sentry/src/lib.rs +++ b/sentry/src/lib.rs @@ -65,6 +65,7 @@ //! * `debug-images`: Attaches a list of loaded libraries to events (currently only supported on unix). //! * `error-chain`: Enables support for the `error-chain` crate. //! * `log`: Enables support for the `log` crate. +//! * `env_logger`: Enables support for the `log` crate with additional `env_logger` support. //! * `slog`: Enables support for the `slog` crate. //! * `test`: Enables testing support. //! * `debug-logs`: Uses the `log` crate for internal logging. @@ -74,6 +75,8 @@ //! * `native-tls`: Uses the `native-tls` crate, which is currently the default. //! This only has an effect on the `reqwest` transport. //! * `rustls`: Enables the `rustls` support of the `reqwest` transport. +//! Please note that `native-tls` is a default feature, and one needs to use +//! `default-features = false` to completely disable building `native-tls` dependencies. #![warn(missing_docs)]