PHP
Capture exceptions from Laravel, Symfony, and Slim with sentry-php pointed at Epure.
Use official sentry-php (fixture captured at 4.8.0, package sentry/sentry). Point dsn at your Epure host. No Epure Composer package.
Use this guide when the process is PHP: Laravel, Symfony, Slim, Artisan, queue workers. Do not use this for JS/TS (→ Next.js). Full map: Pick your SDK.
Capture exceptions in PHP
composer require sentry/sentry, call \Sentry\init once at bootstrap, then throw or captureException. Envelope ingest. Grouping uses raw frames.
How do I install sentry-php?
composer require sentry/sentryKeep sentry/sentry-laravel or Symfony bundles if they are already installed. Only the DSN host changes.
Init the PHP SDK
\Sentry\init([
'dsn' => getenv('SENTRY_DSN'),
'environment' => 'local',
'release' => 'my-app@0.0.0',
'traces_sample_rate' => 0.0,
'profiles_sample_rate' => 0.0,
]);Local compose DSN shape:
http://YOUR_PUBLIC_KEY@localhost:8080/YOUR_PROJECT_ID| Option | Value |
|---|---|
dsn | Required: public key + Epure host + project UUID |
environment | Tag for the dashboard filter strip |
release | Version string on the issue |
traces_sample_rate | 0; transactions discarded |
profiles_sample_rate | 0; profiles discarded |
Laravel and Symfony integrations stay. Unhandled HTTP exceptions still post envelopes after the DSN swap. Artisan and queue workers need the same init in the CLI bootstrap.
How do I capture handled errors?
try {
risky();
} catch (Throwable $e) {
\Sentry\captureException($e);
throw $e;
}What should I see after ingest?
202, then an issue whose title matches the exception class and message, with a stack as sentry-php sent it.
Why does PHP never send?
| What you see | What to do |
|---|---|
| 401 / 403 | Recopy the DSN from Settings → SDK connection |
| 202, empty Issues | Match the environment chip to environment |
| Queue throws missing | Init the SDK in the worker process, not only public/index.php |
Next
Does Epure demangle PHP stacks?
No. There is no PHP symbol server. Grouping uses file, function, and line as sentry-php sends them. Confirm with Verify.
Are traces stored?
No. Set traces_sample_rate and profiles_sample_rate to 0. Those item types are discarded on ingest. Exception events plus breadcrumbs stay.