thinkphp/library/think/App.php
代码语言:javascript复制 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 (thinkfacadeEnv::get('APP_ENV') == 'test') {
Sentryinit(['dsn' => 'http://dd2c004sdfasfe839c202ce8b4a3503801e046e@sentry-dev.owenzhang.cn/6']);
} elseif (thinkfacadeEnv::get('APP_ENV') == 'prod') {
if ($sys == 343) {
Sentryinit(['dsn' => 'http://3aa38ce999114ceebe78c60f8da4a189@sentry-dev.owen.cn/8']);
} elseif ($sys == 'sports') {
Sentryinit(['dsn' => 'http://b260c1b8fff7dac20c424ab04f82ebbf@sentry-dev.zhang.cn/11']);
}
}
}
复制代码