Install the sentry PHP SDK using Composer:
composer require sentry/sdk
Initialize the SDK as early as possible in your application:
\Sentry\init([
'dsn' => 'YOUR_DSN',
'traces_sample_rate' => 0.01, // 1% of transactions
]);
Verify your setup:
throw new Exception("Test GlitchTip error!");
traces_sample_rate to a low value in production to save disk space.release and environment options to track deployments.