zing/laravel-sentry
Provides sentry context middleware.
1,051
1
| Install | |
|---|---|
composer require zing/laravel-sentry |
|
| Latest Version: | 3.5.0 |
| PHP: | ^8.0 |
| Laravel: | 8 – 13 |
| Older releases: | 6 · 7 |
| License: | MIT |
| Last Updated: | Oct 12, 2026 |
| Links: | GitHub · Packagist |
Maintainer: zingimmick
Laravel Sentry
Requirements
Require Laravel Sentry using Composer:
composer require zing/laravel-sentry
Usage
Add user context
use Zing\LaravelSentry\Middleware\SentryContext;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
protected $middleware = [
// ...
SentryContext::class,
];
// ...
}
Custom user context
use Zing\LaravelSentry\Middleware\SentryContext;
class CustomSentryContext extends SentryContext
{
/**
* @param \Zing\LaravelSentry\Tests\User $user
*
* @return array<string, mixed>|mixed[]
*/
protected function resolveUserContext(string $guard, \Illuminate\Contracts\Auth\Authenticatable $user): array
{
if ($guard === 'api') {
return [
'id' => $user->getAuthIdentifier(),
'username' => $user->username,
];
}
return parent::resolveUserContext($guard, $user);
}
}
License
Laravel Sentry is an open-sourced software licensed under the MIT license.
Related Packages
coreproc/raven-laravel
A Laravel 5.1 library that easily integrates raven-php to centralize your logs u...
2,888
8
rcrowe/laravel-sentry
Tasty intergration of Laravel & Sentry for sweet reporting of your logs
2,757
15
twineis/raven-php
Sentry (Raven) error monitoring for Laravel and Lumen with send in background vi...
18,108
11
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.5.0 | ^8.0 | ^8.0 | | MIT | |
| 3.4.0 | ^8.0 | ^8.0 | | MIT | |
| 3.3.0 | ^8.0 | ^8.0 | | MIT | |
| 3.2.0 | ^8.0 | ^8.0 | | MIT | |
| 3.1.0 | ^8.0 | ^8.0 | | MIT | |
| 3.0.0 | ^8.0 | ^8.0 | | MIT | |
| 2.5.0 | ^7.2 | | ^6.0 | | MIT | |
| 2.4.1 | ^7.2 | | ^6.0 | | MIT | |
| 2.4.0 | ^7.2 | | ^6.0 | | MIT | |
| 2.3.2 | ^7.2 | | ^6.0 | | MIT | |
| 2.3.1 | ^7.2 | | ^6.0 | | MIT | |
| 2.3.0 | ^7.2 | | ^6.0 | | MIT | |
| 2.2.0 | ^7.2 | | ^6.0 | | MIT | |
| 2.1.0 | ^7.2 | | ^6.0 | | MIT | |
| 2.0.1 | ^7.2 | | ^6.0 | | MIT | |
| 2.0.0 | ^7.2 | | ^6.0 | | MIT | |
| 1.0.1 | ^7.2 | | ^6.0 | | MIT | |
| 1.0.0 | ^7.2 | | ^6.0 | | MIT | |
| 0.3.1 | ^7.2 | | ^6.0 | | MIT | |
| 0.3.0 | ^7.2 | | ^6.0 | | MIT | |
| 0.2.0 | ^7.2 | ^6.0 | | MIT | |
| 0.1.1 | ^7.2 | ^6.0| | MIT | |
| 0.1.0 | ^7.2 | ^6.0| | MIT | |
| 0.0.4 | ^7.2 | ^6.0| | MIT | |
| 0.0.3 | ^7.2 | ^6.0| | MIT | |
| 0.0.2 | ^7.2 | ^6.0| | MIT | |
| 0.0.1 | ^7.2 | ^6.0| | MIT |