PHPackages                             laravel-enso/sentry - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. laravel-enso/sentry

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

laravel-enso/sentry
===================

Sentry exception handling for Laravel Enso

2.0.3(2mo ago)025.0k↓34.4%13MITPHPPHP ^8.0

Since Jun 23Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/laravel-enso/sentry)[ Packagist](https://packagist.org/packages/laravel-enso/sentry)[ Docs](https://github.com/laravel-enso/Sentry)[ RSS](/packages/laravel-enso-sentry/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (18)Used By (3)

Sentry
======

[](#sentry)

[![License](https://camo.githubusercontent.com/3cee513463d6206161c5b85a91d55c47963a17649c0d16365d27a6f80cb599dd/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f73656e7472792f6c6963656e7365)](LICENSE)[![Stable](https://camo.githubusercontent.com/625e845ac895b1fde50594120d767c91b4bbb4259c991a762628df1f0858162e/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f73656e7472792f76657273696f6e)](https://packagist.org/packages/laravel-enso/sentry)[![Downloads](https://camo.githubusercontent.com/4ff20773980ec2d0c98816455a1332f01a9d1aa323b45304af65883d5887d1a6/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d656e736f2f73656e7472792f646f776e6c6f616473)](https://packagist.org/packages/laravel-enso/sentry)[![PHP](https://camo.githubusercontent.com/ef6afd4ccdaa708a9b1a0a353d6d03a13ca1f03887b8db701d4118dc30a6735a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e302532422d3737376262342e737667)](composer.json)[![Issues](https://camo.githubusercontent.com/5a1406b6fb84933c03366043c0165e5d1a045e97fdb79b092319788d6bd08012/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6c61726176656c2d656e736f2f73656e7472792e737667)](https://github.com/laravel-enso/sentry/issues)[![Merge Requests](https://camo.githubusercontent.com/71c7caa27f9da1d6bd9dbd4d1922faa21f691a9bf6994cd89ccb335ea8135e85/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f6c61726176656c2d656e736f2f73656e7472792e737667)](https://github.com/laravel-enso/sentry/pulls)

Description
-----------

[](#description)

Sentry integrates Laravel Enso with Sentry error reporting.

The package provides a small exception-reporting helper that enriches captured events with the current Enso user and role, deduplicates repeated exceptions for a configurable interval, stores the last Sentry event id per authenticated user, and exposes an authenticated endpoint that allows the frontend to retrieve that event id.

It is designed to complement Enso's backend exception pipeline and frontend error-reporting flows without requiring application code to talk to the Sentry SDK directly.

Installation
------------

[](#installation)

Install the package in an application that already uses the Sentry Laravel SDK:

```
composer require laravel-enso/sentry
```

If needed, publish the package config:

```
php artisan vendor:publish --tag=enso-sentry-config
```

Default configuration:

```
return [
    'dedupeInterval' => 5,
];
```

Features
--------

[](#features)

- Reports unhandled exceptions through the Sentry Laravel integration.
- Enriches Sentry scope with the authenticated Enso user id, name, email, and role.
- Deduplicates repeated exceptions for a configurable interval.
- Stores the latest Sentry event id per authenticated user in cache.
- Exposes an authenticated API endpoint for reading the current event id from the frontend.
- Falls back to the file cache store for Redis exceptions during dedupe checks.

Usage
-----

[](#usage)

Report an exception through the package handler:

```
use LaravelEnso\Sentry\Exceptions\Handler;

Handler::report($exception);
```

Read the current event id from backend code:

```
$eventId = Handler::eventId();
```

The frontend can retrieve the same value from:

```
route('sentry');
```

Which returns:

```
{
  "eventId": "..."
}
```

::: tip Tip The handler stores the event id only when the application is running in production and an authenticated user is available. :::

API
---

[](#api)

### Route

[](#route)

Authenticated endpoint:

- `GET /api/sentry`

Route name:

- `sentry`

Middleware:

- `api`
- `auth`

### Controller

[](#controller)

`LaravelEnso\Sentry\Http\Controllers\Sentry`

Returns:

- `eventId`

### Exception Handler Helper

[](#exception-handler-helper)

`LaravelEnso\Sentry\Exceptions\Handler`

Public methods:

- `report(Throwable $exception): void`
- `eventId(): ?string`

Behavior:

- skips duplicate exceptions within the dedupe interval
- resolves the current user across the configured default guard, `web`, and `sanctum`
- sends the exception to Sentry as an unhandled exception
- stores the last event id per authenticated user when running in production

### Configuration

[](#configuration)

`config/enso/sentry.php`

Keys:

- `dedupeInterval`

Depends On
----------

[](#depends-on)

Framework dependency:

- [`laravel/framework`](https://github.com/laravel/framework) [↗](https://github.com/laravel/framework)

Companion frontend package:

- [`@enso-ui/sentry`](https://docs.laravel-enso.com/frontend/sentry.html) [↗](https://github.com/enso-ui/sentry)

Contributions
-------------

[](#contributions)

are welcome. Pull requests are great, but issues are good too.

Thank you to all the people who already contributed to Enso!

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance86

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 52.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~126 days

Recently: every ~15 days

Total

15

Last Release

73d ago

Major Versions

1.5.0 → 2.0.02026-04-09

PHP version history (2 changes)1.0.0PHP &gt;=8.0

1.3.0PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16073274?v=4)[Adrian Ocneanu](/maintainers/aocneanu)[@aocneanu](https://github.com/aocneanu)

---

Top Contributors

[![vmcvlad](https://avatars.githubusercontent.com/u/37445394?v=4)](https://github.com/vmcvlad "vmcvlad (11 commits)")[![aocneanu](https://avatars.githubusercontent.com/u/16073274?v=4)](https://github.com/aocneanu "aocneanu (7 commits)")[![AbdullahiAbdulkabir](https://avatars.githubusercontent.com/u/33360580?v=4)](https://github.com/AbdullahiAbdulkabir "AbdullahiAbdulkabir (1 commits)")[![gandesc](https://avatars.githubusercontent.com/u/14071925?v=4)](https://github.com/gandesc "gandesc (1 commits)")[![GITmanuela](https://avatars.githubusercontent.com/u/44998004?v=4)](https://github.com/GITmanuela "GITmanuela (1 commits)")

---

Tags

sentrylaravel-ensovue-bulmavue-spa

### Embed Badge

![Health badge](/badges/laravel-enso-sentry/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-enso-sentry/health.svg)](https://phpackages.com/packages/laravel-enso-sentry)
```

###  Alternatives

[laravel-enso/core

The backend shell of a Laravel Enso application

3465.3k205](/packages/laravel-enso-core)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.7k2](/packages/crumbls-layup)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
