@@ -174,14 +174,10 @@ pub struct ClientOptions {
174174 /// When automatic session tracking is enabled, a new "user-mode" session
175175 /// is started at the time of `sentry::init`, and will persist for the
176176 /// application lifetime.
177- ///
178- /// **NOTE**: The `release-health` feature (enabled by default) needs to be enabled for this option to have
179- /// any effect.
177+ #[ cfg( feature = "release-health" ) ]
180178 pub auto_session_tracking : bool ,
181179 /// Determine how Sessions are being tracked.
182- ///
183- /// **NOTE**: The `release-health` feature (enabled by default) needs to be enabled for this option to have
184- /// any effect.
180+ #[ cfg( feature = "release-health" ) ]
185181 pub session_mode : SessionMode ,
186182 /// Border frames which indicate a border from a backtrace to
187183 /// useless internals. Some are automatically included.
@@ -232,7 +228,8 @@ impl fmt::Debug for ClientOptions {
232228
233229 let integrations: Vec < _ > = self . integrations . iter ( ) . map ( |i| i. name ( ) ) . collect ( ) ;
234230
235- f. debug_struct ( "ClientOptions" )
231+ let mut debug_struct = f. debug_struct ( "ClientOptions" ) ;
232+ debug_struct
236233 . field ( "dsn" , & self . dsn )
237234 . field ( "debug" , & self . debug )
238235 . field ( "release" , & self . release )
@@ -260,9 +257,14 @@ impl fmt::Debug for ClientOptions {
260257 . field ( "http_proxy" , & self . http_proxy )
261258 . field ( "https_proxy" , & self . https_proxy )
262259 . field ( "shutdown_timeout" , & self . shutdown_timeout )
263- . field ( "accept_invalid_certs" , & self . accept_invalid_certs )
260+ . field ( "accept_invalid_certs" , & self . accept_invalid_certs ) ;
261+
262+ #[ cfg( feature = "release-health" ) ]
263+ debug_struct
264264 . field ( "auto_session_tracking" , & self . auto_session_tracking )
265- . field ( "session_mode" , & self . session_mode )
265+ . field ( "session_mode" , & self . session_mode ) ;
266+
267+ debug_struct
266268 . field ( "extra_border_frames" , & self . extra_border_frames )
267269 . field ( "trim_backtraces" , & self . trim_backtraces )
268270 . field ( "user_agent" , & self . user_agent )
@@ -295,7 +297,9 @@ impl Default for ClientOptions {
295297 https_proxy : None ,
296298 shutdown_timeout : Duration :: from_secs ( 2 ) ,
297299 accept_invalid_certs : false ,
300+ #[ cfg( feature = "release-health" ) ]
298301 auto_session_tracking : false ,
302+ #[ cfg( feature = "release-health" ) ]
299303 session_mode : SessionMode :: Application ,
300304 extra_border_frames : vec ! [ ] ,
301305 trim_backtraces : true ,
0 commit comments