Skip to content

Commit

Permalink
Merge pull request #665 from humanmade/xray-excimer-support
Browse files Browse the repository at this point in the history
Bootstrap XRay if Excimer is available
  • Loading branch information
kovshenin authored Aug 23, 2022
2 parents b7f27df + 7d5fc98 commit 2c060b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ function bootstrap() {
$config = get_config();

$is_alb_healthcheck = isset( $_SERVER['HTTP_USER_AGENT'] ) && strpos( $_SERVER['HTTP_USER_AGENT'], 'ELB-HealthChecker' ) === 0;
$has_profiler = class_exists( 'ExcimerProfiler' ) || function_exists( 'xhprof_sample_enable' );

if (
$config['xray']
&& function_exists( 'xhprof_sample_enable' )
&& $has_profiler
&& php_sapi_name() !== 'cli'
&& ! class_exists( 'HM\\Cavalcade\\Runner\\Runner' )
&& ! $is_alb_healthcheck
Expand Down

0 comments on commit 2c060b1

Please sign in to comment.