@@ -12,6 +12,22 @@ use crate::{ClientOptions, Integration};
1212/// also sets the `dsn`, `release`, `environment`, and proxy settings based on
1313/// environment variables.
1414///
15+ /// When the `default_integrations` option is set to `true` (by default), the
16+ /// following integrations will be added *before* any manually defined
17+ /// integrations, depending on enabled feature flags:
18+ ///
19+ /// 1. [`AttachStacktraceIntegration`] (`feature = "backtrace"`)
20+ /// 2. [`DebugImagesIntegration`] (`feature = "debug-images"`)
21+ /// 3. [`ErrorChainIntegration`] (`feature = "error-chain"`)
22+ /// 4. [`ContextIntegration`] (`feature = "contexts"`)
23+ /// 5. [`FailureIntegration`] (`feature = "failure"`)
24+ /// 6. [`PanicIntegration`] (`feature = "panic"`)
25+ /// 7. [`ProcessStacktraceIntegration`] (`feature = "backtrace"`)
26+ ///
27+ /// Some integrations can be used multiple times, however, the
28+ /// [`PanicIntegration`] can not, and it will not pick up custom panic
29+ /// extractors when it is defined multiple times.
30+ ///
1531/// # Examples
1632/// ```
1733/// std::env::set_var("SENTRY_RELEASE", "release-from-env");
@@ -24,6 +40,14 @@ use crate::{ClientOptions, Integration};
2440/// assert_eq!(options.release, Some("release-from-env".into()));
2541/// assert!(options.transport.is_some());
2642/// ```
43+ ///
44+ /// [`AttachStacktraceIntegration`]: integrations/backtrace/struct.AttachStacktraceIntegration.html
45+ /// [`DebugImagesIntegration`]: integrations/debug_images/struct.DebugImagesIntegration.html
46+ /// [`ErrorChainIntegration`]: integrations/error_chain/struct.ErrorChainIntegration.html
47+ /// [`ContextIntegration`]: integrations/contexts/struct.ContextIntegration.html
48+ /// [`FailureIntegration`]: integrations/failure/struct.FailureIntegration.html
49+ /// [`PanicIntegration`]: integrations/panic/struct.PanicIntegration.html
50+ /// [`ProcessStacktraceIntegration`]: integrations/backtrace/struct.ProcessStacktraceIntegration.html
2751pub fn apply_defaults ( mut opts : ClientOptions ) -> ClientOptions {
2852 if opts. transport . is_none ( ) {
2953 opts. transport = Some ( Arc :: new ( DefaultTransportFactory ) ) ;
0 commit comments