Skip to content

Commit

Permalink
add timeline active check for fatals (#2945)
Browse files Browse the repository at this point in the history
  • Loading branch information
realFlowControl authored Nov 14, 2024
1 parent 1f33697 commit 66df35c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions profiling/src/timeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@ unsafe extern "C" fn ddog_php_prof_zend_error_observer(
return;
}

let timeline_enabled = REQUEST_LOCALS.with(|cell| {
cell.try_borrow()
.map(|locals| locals.system_settings().profiling_timeline_enabled)
.unwrap_or(false)
});

if !timeline_enabled {
return;
}

#[cfg(zend_error_observer_80)]
let file = unsafe {
let mut len = 0;
Expand Down

0 comments on commit 66df35c

Please sign in to comment.