zing/laravel-sentry
zing/laravel-sentry integrates Sentry error tracking with Laravel, making it easy to capture exceptions, report failures, and monitor application health in production. It provides a simple way to connect your app to Sentry with minimal configuration and keeps error reporting consistent across your s...
sentry/sentry-laravel (the first-party SDK), does not cover tracing/performance beyond what Sentry natively captures, and should not be used as an argument for standardizing on Sentry across the org. Treat it as a garnish on an existing Sentry integration, never as the integration itself.Adopt (cautiously) when all of the following hold:
sentry/sentry-laravel installed and working; this is additive context, not a replacement.Look elsewhere — or just write it yourself — when:
sentry/sentry-laravel's built-in SendDefaultPii, user-context integration, or a Scope::configureScope call in a small service provider already covers the need. Test this first — it very likely does.Verdict for the roadmap: evaluate as a code snippet, not a dependency. Budget a spike of a few hours: read the middleware, decide whether to depend on it or copy the pattern into your own App\Http\Middleware\SentryContext. The latter carries near-zero risk and identical benefit.
To executives: This is a small, free utility that makes production error reports more useful — when something breaks, the report tells us which user, which tenant, which request was affected instead of just a stack trace. That shortens incident diagnosis. It is not a new vendor, contract, or platform commitment; the license is MIT and the integration surface is one middleware in the request pipeline. Cost is engineering hours, not dollars. Because the project has effectively no community adoption, we should treat it as a pattern to borrow rather than a library to depend on — we get the benefit with none of the supply-chain risk.
To engineering: The package is a ~middleware wrapper that pushes request/user context into the active Sentry scope. It sits on top of sentry/sentry-laravel; it does not replace it. Recommendation is a timeboxed spike: (1) confirm the first-party SDK doesn't already give us this via configureScope in a service provider, (2) if it doesn't, evaluate the middleware's ordering and PII handling, (3) default to inlining the ~50 lines into our own middleware rather than adding a 1-star, zero-dependent dependency to the request path. Either outcome is a win — we either get a cheap observability improvement or we confirm we don't need it. Watch the PII angle: attaching user identifiers to Sentry events needs a deliberate decision, not a default.
How can I help you explore Laravel packages today?