thinkphp/library/think/App.php
public function initialize()
{
$this->initSentry();
}
/**
* 初始化sentry
*/
public function initSentry()
{
$domain = $this->request->domain();
$sys = 'cli';
if (strpos($domain, 'sports') !== false) {
session('sys', 'sports');
$sys = 'sports';
}
if (\think\facade\Env::get('APP_ENV') == 'test') {
\Sentry\init(['dsn' => 'http://[email protected]/6']);
} elseif (\think\facade\Env::get('APP_ENV') == 'prod') {
if ($sys == 343) {
\Sentry\init(['dsn' => 'http://[email protected]/8']);
} elseif ($sys == 'sports') {
\Sentry\init(['dsn' => 'http://[email protected]/11']);
}
}
}