aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/index.php b/index.php
index 061509d..20a424c 100644
--- a/index.php
+++ b/index.php
@@ -13,13 +13,24 @@ require('./vendor/autoload.php');
$app = new Wcms\Application();
$app->wakeup();
-Sentry\init(['dsn' => Wcms\Config::sentrydsn()]);
+Sentry\init([
+ 'dsn' => Wcms\Config::sentrydsn(),
+ 'release' => 'w_cms_v' . getversion(),
+ 'project_root' => 'app',
+]);
+Sentry\configureScope(function (Sentry\State\Scope $scope): void {
+ $scope->setUser([
+ 'id' => Wcms\Config::url(),
+ 'username' => Wcms\Config::basepath(),
+ ]);
+});
try {
$matchoper = new Wcms\Routes();
$matchoper->match();
} catch (Exception $e) {
+ Sentry\captureException($e);
echo '<h1>⚠ Woops ! There is a little problem : </h1>', $e->getMessage(), "\n";
}