Commit 4990dfff authored by Matthias Larisch's avatar Matthias Larisch

Move sentry include to config.inc.php

inc.php was not included in all front-routers/entry points, so some
paths did not log errors. config.inc.php is close to a general setup
file where this should go.
parent ed42c99e
Pipeline #11999703 passed with stage
in 4 minutes and 45 seconds
......@@ -15,3 +15,16 @@ if (file_exists($env_filename)) {
if (!defined('SOCK_URL')) {
define('SOCK_URL', 'http://127.0.0.1:1338/');
}
/*
* Configure Raven (sentry.io client) for remote error reporting
*/
if (defined('SENTRY_URL')) {
require_once 'vendor/sentry/sentry/lib/Raven/Autoloader.php';
Raven_Autoloader::register();
$client = new Raven_Client(SENTRY_URL);
$client->install();
$client->tags_context(array('FS_ENV' => $FS_ENV));
}
<?php
/**
* Automatically includes classes.
*
* @throws Exception
*
* @param string $class_name Name of the class to load
*/
require_once 'config.inc.php';
/*
* Configure Raven (sentry.io client) for remote error reporting
*/
if (defined('SENTRY_URL')) {
require_once 'vendor/sentry/sentry/lib/Raven/Autoloader.php';
Raven_Autoloader::register();
$client = new Raven_Client(SENTRY_URL);
$client->install();
$client->tags_context(array('FS_ENV' => $FS_ENV));
}
require_once 'lib/func.inc.php';
require_once 'lib/Session.php';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment