@@ -25,6 +25,7 @@ pub struct SystemSettings {
25
25
pub profiling_allocation_enabled : bool ,
26
26
pub profiling_timeline_enabled : bool ,
27
27
pub profiling_exception_enabled : bool ,
28
+ pub profiling_exception_message_enabled : bool ,
28
29
29
30
// todo: can't this be Option<String>? I don't think the string can ever be static.
30
31
pub output_pprof : Option < Cow < ' static , str > > ,
@@ -42,6 +43,7 @@ impl SystemSettings {
42
43
self . profiling_allocation_enabled = false ;
43
44
self . profiling_timeline_enabled = false ;
44
45
self . profiling_exception_enabled = false ;
46
+ self . profiling_exception_message_enabled = false ;
45
47
}
46
48
47
49
/// # Safety
@@ -62,6 +64,7 @@ impl SystemSettings {
62
64
profiling_allocation_enabled : profiling_allocation_enabled ( ) ,
63
65
profiling_timeline_enabled : profiling_timeline_enabled ( ) ,
64
66
profiling_exception_enabled : profiling_exception_enabled ( ) ,
67
+ profiling_exception_message_enabled : profiling_exception_message_enabled ( ) ,
65
68
output_pprof : profiling_output_pprof ( ) ,
66
69
profiling_exception_sampling_distance : profiling_exception_sampling_distance ( ) ,
67
70
profiling_log_level : profiling_log_level ( ) ,
@@ -122,6 +125,7 @@ impl SystemSettings {
122
125
profiling_allocation_enabled : false ,
123
126
profiling_timeline_enabled : false ,
124
127
profiling_exception_enabled : false ,
128
+ profiling_exception_message_enabled : false ,
125
129
output_pprof : None ,
126
130
profiling_exception_sampling_distance : 0 ,
127
131
profiling_log_level : LevelFilter :: Off ,
@@ -138,6 +142,7 @@ impl SystemSettings {
138
142
system_settings. profiling_allocation_enabled = false ;
139
143
system_settings. profiling_timeline_enabled = false ;
140
144
system_settings. profiling_exception_enabled = false ;
145
+ system_settings. profiling_exception_message_enabled = false ;
141
146
}
142
147
}
143
148
@@ -332,6 +337,7 @@ pub(crate) enum ConfigId {
332
337
ProfilingAllocationEnabled ,
333
338
ProfilingTimelineEnabled ,
334
339
ProfilingExceptionEnabled ,
340
+ ProfilingExceptionMessageEnabled ,
335
341
ProfilingExceptionSamplingDistance ,
336
342
ProfilingLogLevel ,
337
343
ProfilingOutputPprof ,
@@ -358,6 +364,7 @@ impl ConfigId {
358
364
ProfilingAllocationEnabled => b"DD_PROFILING_ALLOCATION_ENABLED\0 " ,
359
365
ProfilingTimelineEnabled => b"DD_PROFILING_TIMELINE_ENABLED\0 " ,
360
366
ProfilingExceptionEnabled => b"DD_PROFILING_EXCEPTION_ENABLED\0 " ,
367
+ ProfilingExceptionMessageEnabled => b"DD_PROFILING_EXCEPTION_MESSAGE_ENABLED\0 " ,
361
368
ProfilingExceptionSamplingDistance => b"DD_PROFILING_EXCEPTION_SAMPLING_DISTANCE\0 " ,
362
369
ProfilingLogLevel => b"DD_PROFILING_LOG_LEVEL\0 " ,
363
370
@@ -400,6 +407,7 @@ lazy_static::lazy_static! {
400
407
profiling_allocation_enabled: false ,
401
408
profiling_timeline_enabled: false ,
402
409
profiling_exception_enabled: false ,
410
+ profiling_exception_message_enabled: false ,
403
411
output_pprof: None ,
404
412
profiling_exception_sampling_distance: u32 :: MAX ,
405
413
profiling_log_level: LevelFilter :: Off ,
@@ -415,6 +423,7 @@ lazy_static::lazy_static! {
415
423
profiling_allocation_enabled: true ,
416
424
profiling_timeline_enabled: true ,
417
425
profiling_exception_enabled: true ,
426
+ profiling_exception_message_enabled: false ,
418
427
output_pprof: None ,
419
428
profiling_exception_sampling_distance: 100 ,
420
429
profiling_log_level: LevelFilter :: Off ,
@@ -496,6 +505,16 @@ unsafe fn profiling_exception_enabled() -> bool {
496
505
)
497
506
}
498
507
508
+ /// # Safety
509
+ /// This function must only be called after config has been initialized in
510
+ /// rinit, and before it is uninitialized in mshutdown.
511
+ unsafe fn profiling_exception_message_enabled ( ) -> bool {
512
+ get_system_bool (
513
+ ProfilingExceptionMessageEnabled ,
514
+ DEFAULT_SYSTEM_SETTINGS . profiling_exception_message_enabled ,
515
+ )
516
+ }
517
+
499
518
/// # Safety
500
519
/// This function must only be called after config has been initialized in
501
520
/// rinit, and before it is uninitialized in mshutdown.
@@ -811,6 +830,16 @@ pub(crate) fn minit(module_number: libc::c_int) {
811
830
ini_change : Some ( zai_config_system_ini_change) ,
812
831
parser : None ,
813
832
} ,
833
+ zai_config_entry {
834
+ id : transmute ( ProfilingExceptionMessageEnabled ) ,
835
+ name : ProfilingExceptionMessageEnabled . env_var_name ( ) ,
836
+ type_ : ZAI_CONFIG_TYPE_BOOL ,
837
+ default_encoded_value : ZaiStr :: literal ( b"0\0 " ) ,
838
+ aliases : ptr:: null_mut ( ) ,
839
+ aliases_count : 0 ,
840
+ ini_change : Some ( zai_config_system_ini_change) ,
841
+ parser : None ,
842
+ } ,
814
843
zai_config_entry {
815
844
id : transmute ( ProfilingExceptionSamplingDistance ) ,
816
845
name : ProfilingExceptionSamplingDistance . env_var_name ( ) ,
0 commit comments