SentryIntegration: fix logging errors

This commit is contained in:
Benjamin Renard 2024-12-13 15:18:20 +01:00
parent 4b73564f31
commit 7693ea44ee
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -40,8 +40,15 @@ class SentryIntegration {
),
)
);
self :: $dsn = App::get('sentry.dsn');
if (!self :: $dsn) {
Log :: trace("SentryIntegration::init(): no DSN configured");
return;
}
\Sentry\init([
'dsn' => App::get('sentry.dsn'),
'dsn' => self :: $dsn,
'traces_sample_rate' => App::get('sentry.traces_sample_rate', null, 'float'),
]);