PHPackages                             devpulse/laravel - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. devpulse/laravel

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

devpulse/laravel
================

DevPulse Laravel SDK — auto error capture for Laravel apps

2.0.0(3mo ago)021MITPHPPHP ^8.1CI passing

Since Mar 22Pushed 3mo agoCompare

[ Source](https://github.com/SekolahCode/devpulse-laravel)[ Packagist](https://packagist.org/packages/devpulse/laravel)[ RSS](/packages/devpulse-laravel/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (5)Versions (9)Used By (0)

DevPulse Laravel SDK
====================

[](#devpulse-laravel-sdk)

Real-time error tracking for Laravel — self-hosted and free.

Requires a running **DevPulse server v1.0+** and PHP 8.1+.

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

[](#installation)

```
composer require devpulse/laravel
```

Publish the config:

```
php artisan vendor:publish --tag=devpulse-config
```

Configuration
-------------

[](#configuration)

Add to `.env`:

```
DEVPULSE_DSN=https://your-devpulse-host/api/ingest/YOUR_API_KEY
DEVPULSE_ENV=production
DEVPULSE_RELEASE=1.4.2        # or set APP_VERSION — falls back to git SHA
```

### All options

[](#all-options)

VariableDefaultDescription`DEVPULSE_DSN`—Ingest URL with API key (required)`DEVPULSE_ENABLED``true`Master on/off switch`DEVPULSE_ENV``APP_ENV`Environment name sent with events`DEVPULSE_RELEASE``APP_VERSION` / git SHARelease/version tag`DEVPULSE_ASYNC``true`Fire-and-forget HTTP (recommended)`DEVPULSE_TIMEOUT``2`HTTP timeout in seconds`DEVPULSE_SAMPLE_RATE``1.0`0.0–1.0 fraction of events to send`DEVPULSE_SLOW_QUERY_MS``1000`Slow query threshold (ms)`DEVPULSE_SLOW_REQUEST_MS``3000`Slow request threshold (ms)`DEVPULSE_MIN_LOG_LEVEL``error`Minimum log level to capture`DEVPULSE_USER_CONTEXT``true`Attach auth user to events### Capture toggles

[](#capture-toggles)

VariableDefaultDescription`DEVPULSE_CAPTURE_EXCEPTIONS``true`Unhandled exceptions`DEVPULSE_CAPTURE_LOGS``true``Log::error()` / `Log::critical()``DEVPULSE_CAPTURE_SLOW_QUERIES``true`Slow DB queries`DEVPULSE_CAPTURE_SLOW_REQUESTS``true`Slow HTTP requests (requires middleware)`DEVPULSE_CAPTURE_QUEUE_FAILURES``true`Failed queue jobs`DEVPULSE_CAPTURE_COMMANDS``true`Artisan command failures (non-zero exit)What's captured automatically
-----------------------------

[](#whats-captured-automatically)

- **Exceptions** — All unhandled exceptions (excluding ignored list)
- **Log::error / critical** — Laravel log entries at `error` level or above
- **Slow queries** — DB queries exceeding the threshold, plus all queries as breadcrumbs
- **Slow requests** — HTTP requests exceeding the threshold (add middleware)
- **Queue failures** — Failed jobs with queue, job class, and attempt count
- **Artisan failures** — Commands that exit with a non-zero code
- **User context** — Authenticated user ID, email, name (auto-detected)
- **Release** — Version tag from `DEVPULSE_RELEASE`, `APP_VERSION`, or git SHA
- **Breadcrumbs** — Last 20 queries and log entries attached to exceptions

Ignored exceptions
------------------

[](#ignored-exceptions)

The following are never reported by default (add more in `config/devpulse.php`):

- `ValidationException`
- `AuthenticationException`
- `AuthorizationException`
- `ModelNotFoundException`
- `NotFoundHttpException`
- `ThrottleRequestsException`
- `TokenMismatchException`

Slow request middleware
-----------------------

[](#slow-request-middleware)

Register in `app/Http/Kernel.php` (Laravel 10) or `bootstrap/app.php` (Laravel 11+):

```
// Laravel 10 — app/Http/Kernel.php
protected $middleware = [
    \DevPulse\Laravel\Http\Middleware\DevPulseContext::class,
];

// Laravel 11 — bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->append(\DevPulse\Laravel\Http\Middleware\DevPulseContext::class);
})
```

Manual capture
--------------

[](#manual-capture)

```
use DevPulse\Laravel\DevPulseFacade as DevPulse;

// Capture an exception manually
try {
    riskyOperation();
} catch (\Throwable $e) {
    DevPulse::capture($e, ['order_id' => $orderId]);
    throw $e;
}

// Capture a message
DevPulse::captureMessage('Payment gateway timeout', 'warning', [
    'gateway'     => 'stripe',
    'amount'      => $amount,
    'customer_id' => $customerId,
]);
```

Testing
-------

[](#testing)

Use `DevPulse::fake()` to assert events in tests without hitting the server:

```
use DevPulse\Laravel\DevPulseFacade as DevPulse;

public function test_order_failure_is_tracked(): void
{
    $fake = DevPulse::fake();

    $this->post('/orders', ['invalid' => 'data']);

    $fake->assertCaptured(\App\Exceptions\PaymentFailedException::class);
}

public function test_slow_payment_is_reported(): void
{
    $fake = DevPulse::fake();

    // ... trigger slow payment ...

    $fake->assertCapturedMessage('Slow request');
}

public function test_healthy_request_sends_nothing(): void
{
    $fake = DevPulse::fake();

    $this->get('/health');

    $fake->assertNothingCaptured();
}
```

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance82

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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 ~2 days

Total

8

Last Release

91d ago

Major Versions

v1.0.6 → 2.0.02026-04-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/c37dacd4e7aba74dd18c7f89b6628de9ed23653b3504efb9028198902ad8c94b?d=identicon)[sekolahcode](/maintainers/sekolahcode)

---

Tags

laravelloggingmonitoringerror-trackingdevpulse

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

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

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

###  Alternatives

[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.9M11](/packages/rollbar-rollbar-laravel)

PHPackages © 2026

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