[+] подключение сентри и новый метод логирования
This commit is contained in:
1 parent
295eca8f8a
commit
b55f76ade5
7 files changed
+1983
-4
No files matched your search
@@ -10,6 +10,29 @@
|
||||
session_start();
|
||||
}
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
\Sentry\init(
|
||||
[
|
||||
'dsn' => 'https://8657ac1a900c44e5bc51714bb4c00dbb@o1303100.ingest.sentry.io/6541634',
|
||||
'error_types' => E_ALL,
|
||||
]
|
||||
);
|
||||
|
||||
Sentry\configureScope(function (Sentry\State\Scope $sentryScope) {
|
||||
$sentryScope->setExtra('user_id', $_SESSION['id']);
|
||||
$sentryScope->setExtra('user_login', $_SESSION['login']);
|
||||
$sentryScope->setExtra('user_token', $_SESSION['token']);
|
||||
});
|
||||
/*
|
||||
try {
|
||||
$this->functionFailsForSure();
|
||||
} catch (\Throwable $exception) {
|
||||
\Sentry\captureException($exception);
|
||||
}
|
||||
|
||||
// OR
|
||||
|
||||
\Sentry\captureLastError();
|
||||
*/
|
||||
|
||||
|
||||
ob_start(function ($buffer) {
|
||||
|
||||
Reference in new issue
Block a user