Sentry for Laravel

Official Sentry SDK for Laravel with automatic error, log, and performance tracing capture

SDK
Composer
v4.27.0
1,350stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
84/100Excellent
Development Activity72
Maintenance80
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture82
Code Quality84
Innovation70
Learning Curve82

Sentry for Laravel is the official first-party SDK that wires Sentry’s error monitoring, log capture, and performance/tracing instrumentation into a Laravel application with minimal setup. Installing the package and registering Integration::handles($exceptions) in bootstrap/app.php automatically reports unhandled exceptions, and the SDK can additionally be configured as a Laravel log channel to capture info/debug level logs alongside errors.

Built on top of sentry/sentry, the underlying PHP SDK, this package adds Laravel-specific integrations: a service provider, event handler, console command (sentry:publish) for scaffolding configuration, HTTP/job/log tracing integrations, and feature flags for enabling specific instrumentation. It supports every actively maintained Laravel version from 6.x through 13.x, with version-gated compatibility documented explicitly in the README for older Laravel and Lumen releases.

What You Get

  • Automatic unhandled-exception capture via Integration::handles($exceptions) in bootstrap/app.php
  • A Laravel log-channel integration so info/debug level logs are captured alongside errors, not just exceptions
  • An Artisan command (sentry:publish --dsn=...) that scaffolds config/sentry.php and writes the DSN into .env
  • Built-in tracing integrations for HTTP requests, queued jobs, and database/log operations (Tracing/, Jobs/, Http/, Logs/)
  • A manual capture API (Sentry\captureException()) for reporting caught exceptions explicitly
  • Version-gated compatibility across Laravel 6.x through 13.x and legacy Lumen, documented per SDK version

Common Use Cases

  • Adding production error monitoring to a Laravel application with a few lines of bootstrap configuration
  • Capturing performance traces for HTTP requests and queued jobs to diagnose latency issues in a Laravel app
  • Routing Laravel log output (not just exceptions) into Sentry via the log-channel integration
  • Manually reporting caught exceptions from within try/catch blocks using captureException()
  • Upgrading a legacy Laravel/Lumen application onto a maintained error-monitoring SDK compatible with its specific framework version

Under The Hood

Architecture: The package registers a ServiceProvider/BaseServiceProvider that wires Laravel’s container to the underlying sentry/sentry PHP client, with EventHandler.php and Integration.php bridging Laravel’s exception/event system into Sentry capture calls; instrumentation is split by concern into Tracing/ (performance spans), Http/ (request-level context), Jobs/ (queue job tracing), Logs/ (log-channel bridging), and Features/ (opt-in capability flags), totaling roughly 1,800 lines across the core src/Sentry/Laravel classes. Tech Stack: PHP supporting both 7.2 and 8.x, targeting illuminate/support ^6.0 through ^13.0 in a single codebase, with sentry/sentry as the core dependency and symfony/psr-http-message-bridge plus nyholm/psr7 for PSR-7 HTTP message interop. Code Quality: 50+ PHP test files cover the integration surface, with phpstan.neon/phpstan-baseline.neon enforcing static analysis and friendsofphp/php-cs-fixer for style, run through a Makefile-driven workflow; the project maintains an unusually long, version-annotated compatibility matrix in its README rather than dropping older Laravel support silently. API Design: Setup is deliberately low-friction — one Artisan command scaffolds configuration, one line in bootstrap/app.php wires exception capture, and the SDK degrades gracefully across a wide span of Laravel major versions instead of requiring the latest release, which matters for a monitoring tool meant to work everywhere an app already runs.

Used by 8 apps in this directory

Other

Akaunting

Invoicing Finance

10,070

Open-source online accounting for small businesses and freelancers — invoices, expenses, and reporting without monthly fees or vendor lock-in.

View details
98
Repo Health
73
Technical
63
Dependency
Updated yesterday
PHP
79%
Apache 2.0

Coolify

Devops · Hosting Control Panel

60,738

Open-source self-hosted PaaS — deploy apps, databases and 280+ services on your own servers with no vendor lock-in

View details
92
Repo Health
86
Technical
72
Dependency
Built with
PHP79%
Blade18%
Updated yesterday
PHP
57%
Other

Hi.Events

Ecommerce · Scheduling

3,985

Self-hosted event ticketing platform that keeps your attendee data, brand, and revenue completely under your control.

View details
88
Repo Health
84
Technical
67
Dependency
Built with
PHP57%
TypeScript37%
Updated 6 days ago
PHP
85%
Other

Invoice Ninja

Invoicing Finance · Project Management

10,008

Self-hostable invoicing, time-tracking, and multi-gateway payment platform for freelancers and small businesses, with built-in e-invoicing compliance for EU and global standards.

View details
97
Repo Health
83
Technical
62
Dependency
Built with
PHP85%
XSLT10%
Updated 2 days ago
PHP
48%
AGPL 3.0

Leantime

Productivity · Project Management · Collaboration

11,391

Project management built for ADHD, autism, and dyslexia — simple as Trello, powerful as Jira

View details
90
Repo Health
68
Technical
67
Dependency
Built with
PHP48%
CSS20%
Blade17%
Updated 4 days ago
PHP
61%
Other

OpnForm

Forms Surveys · Marketing

3,609

Build unlimited, embeddable forms with no code — powered by AI, logic rules, and real-time analytics

View details
90
Repo Health
75
Technical
69
Dependency
Built with
PHP61%
Vue31%
Updated yesterday
PHP
63%
AGPL 3.0

Vanguard Backup

Devops

37

Self-hosted backup automation for Ubuntu and Debian servers with S3 storage, SSH-based file and database backup, and multi-channel notifications.

View details
33
Repo Health
80
Technical
70
Dependency
Built with
PHP63%
Blade36%
Updated 9 months ago
PHP
71%
MIT

Yaffa

Invoicing Finance

108

Self-hosted personal finance app for long-term financial planning with AI-powered transaction parsing and investment tracking.

View details
78
Repo Health
78
Technical
72
Dependency
Built with
PHP71%
Vue24%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search