Skip to content

Commit 66df35c

Browse files
add timeline active check for fatals (#2945)
1 parent 1f33697 commit 66df35c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

profiling/src/timeline.rs

+10
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ unsafe extern "C" fn ddog_php_prof_zend_error_observer(
171171
return;
172172
}
173173

174+
let timeline_enabled = REQUEST_LOCALS.with(|cell| {
175+
cell.try_borrow()
176+
.map(|locals| locals.system_settings().profiling_timeline_enabled)
177+
.unwrap_or(false)
178+
});
179+
180+
if !timeline_enabled {
181+
return;
182+
}
183+
174184
#[cfg(zend_error_observer_80)]
175185
let file = unsafe {
176186
let mut len = 0;

0 commit comments

Comments
 (0)