hasValues('sentry:dsn')) (function($cfg) { \Sentry\init([ 'dsn' => $cfg->getString('dsn'), 'traces_sample_rate' => $cfg->getFloat('tracesRate', 0.2), 'profiles_sample_rate' => $cfg->getFloat('profilesRate', 0.2), ]); set_exception_handler(function(\Throwable $ex) { \Sentry\captureException($ex); }); })($cfg->scopeTo('sentry')); $ctx = new SyokuhouContext($cfg);