Browse Source

Added sentry error logging

master
Diane 2 years ago
parent
commit
10f788141c
No known key found for this signature in database GPG Key ID: B13153D92467FCC1
  1. 3
      composer.json
  2. 1442
      composer.lock
  3. 1
      config.php
  4. 5
      public/index.php

3
composer.json

@ -19,7 +19,8 @@
"matthiasmullie/minify": "^1.3",
"scrivo/highlight.php": "v9.18.1.1",
"ext-readline": "*",
"vlucas/phpdotenv": "^4.1"
"vlucas/phpdotenv": "^4.1",
"sentry/sdk": "2.1.0"
},
"license": "Apache-2.0",
"authors": [

1442
composer.lock
File diff suppressed because it is too large
View File

1
config.php

@ -17,6 +17,7 @@ if (file_exists(__DIR__ . '/.env')) {
}
return [
'sentry-dsn' => getenv('SENTRY_DSN'),
'auth_token' => getenv('AUTH_TOKEN'),
'db' => getenv('DB_DSN'),
'resources' => [

5
public/index.php

@ -36,6 +36,11 @@ require_once(ROOT . '/vendor/autoload.php');
use App\Runner;
$config = require_once(ROOT . '/config.php');
if (is_string($config['sentry-dsn'])) {
Sentry\init(['dsn' => $config['sentry-dsn']]);
}
$routes = require_once(ROOT . '/routes.php');
(new Runner($config))->http($routes);
Loading…
Cancel
Save