andrey-helldar/sentriable-laravel
A lightweight Laravel integration for Sentry that simplifies enriching error reports with application context. Traits and helpers make it easy to capture exceptions and messages, giving your team clearer, more actionable alerts with minimal setup.
Architecture fit — sentriable-laravel is a small, single-purpose Laravel package from TheDragonCode (Andrey Helldar) that adds a polymorphic "sentriable" relation so Eloquent models can be tied to Sentry issue/event records. It is a leaf dependency: it sits alongside sentry/sentry-laravel and does not replace it, does not intercept the error pipeline, and does not own configuration. For a TPM this is a low-blast-radius package — the right shape for an observability add-on that a single squad can adopt without a platform-wide decision. The cost is that it also delivers limited value on its own; it only pays off if the team already runs Sentry and actively triages issues against domain entities (orders, tenants, jobs).
Integration feasibility — High in principle. The expected work is composer require, publishing a migration for the pivot/relation table, running it, adding a trait to the relevant models, and writing the glue that records the Sentry event identifier at the point of failure. That glue is the real integration cost and is not something the package can supply — it needs to be designed per application (exception handler, queued job failed() hooks, request middleware). Budget engineering time for the glue, not for the package.
Technical risk — Moderate but well-bounded. Main risks: (1) the package is maintained by a single author, so bus-factor and long-term maintenance are the dominant concerns rather than code quality; (2) the release we are evaluating, v2.1.0, is a minor bump from v2.0.1 published with no changelog body beyond an auto-generated compare link — we cannot state from the release notes alone whether it adds a feature, widens a constraint, or drops a PHP/Laravel version. Treat the version constraint as unpinned-until-verified; read the diff before merging. (3) Writing Sentry identifiers into application tables creates a data-retention question (issue IDs outlive the Sentry retention window) that must be decided, not inherited.
Key questions — Does the team already run Sentry in production with alerting wired to a real on-call rotation? Which models genuinely need issue linkage, and is that linkage used in a workflow (triage dashboard, support tooling) or just accumulated? Does v2.1.0 change the supported PHP/Laravel matrix, and does that match our floor? Who owns the retention policy for stored Sentry references? Is there an internal fork-or-vendor contingency if upstream goes quiet?
Stack fit — Requires a Laravel application on a currently supported PHP line and an existing sentry/sentry-laravel installation; it is an amplifier of Sentry, not a substitute. If Sentry is absent or only used for passive error logging with no triage process, defer adoption — the package would add a table and a trait with no consumer.
Migration path — v2.0.1 → v2.1.0 is a semver-minor step, so the expected path is a constraint bump plus a composer update with no application code changes. That expectation is unverified: the release notes provide no change description, so the migration plan must include reading the compare diff and checking composer.json for changed php/illuminate/* requirements before the bump lands on a shared branch. If the diff shows constraint narrowing, treat it as a breaking change for any service on an older Laravel minor.
Compatibility — Two axes to confirm rather than assume: PHP/Laravel version support (from the package's composer.json, not the release notes) and coexistence with the Sentry SDK version already pinned. Because the package is a thin layer, conflicts are more likely to surface as class/trait name collisions or duplicate migration publishing than as runtime failures — check for an existing in-house equivalent before adding a second one.
Sequencing — (1) Verify the v2.1.0 diff and constraint changes; (2) pilot in one non-critical service with Sentry already live; (3) publish and run the migration in staging; (4) build and review the exception/job-failure glue; (5) prove one end-to-end traversal (failure → Sentry issue → linked model row → triage view); (6) only then roll to additional services. Do not sequence this ahead of Sentry instrumentation itself.
Maintenance — Low ongoing code maintenance, non-trivial dependency stewardship. Single-maintainer projects need a standing check: does the package track new Laravel majors within a reasonable window? Assign a named owner and a quarterly review; an unowned single-author dependency becomes a silent liability at the next framework upgrade.
Support — No vendor support; reliance is on GitHub issues and the author's responsiveness. Set expectations accordingly: internal engineers must be able to read the package source (it is small enough to audit in an afternoon) and, if necessary, patch via a fork. Document that fallback before it is needed.
Scaling — The relation writes one row per linked event; volume scales with error frequency, not traffic, but a noisy failure mode can produce a burst. Plan for retention/pruning from day one, and confirm the migration adds appropriate indexes so triage queries do not degrade. Nothing here is a throughput concern at typical Laravel scale.
Failure modes — The dangerous ones are silent: (a) linkage writes succeed but nothing consumes them, producing dead data and a false sense of observability; (b) the glue throws inside an exception handler or failed() hook, masking the original error — wrap linkage in try/catch and never let observability code fail the request or the job; (c) a constraint bump breaks the build on an older Laravel service during a routine update; (d) Sentry retention expires while database rows persist, leaving dangling references that confuse triage.
Ramp-up — Hours, not days. One engineer can complete the pilot unaided; the real ramp-up cost is process, not technology — the team must agree on what "linked" means in their triage workflow and who acts on it. Adoption without that agreement is the most likely way this package ends up as unused schema.
How can I help you explore Laravel packages today?