PHPackages                             davidcolquhoun/monitor-exceptions-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. davidcolquhoun/monitor-exceptions-laravel

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

davidcolquhoun/monitor-exceptions-laravel
=========================================

Light weight PHP exception monitoring for Laravel.

v1.0.2(3mo ago)067proprietaryPHPPHP &gt;=8.1

Since Mar 14Pushed 3mo agoCompare

[ Source](https://github.com/davidcolquhoun/monitor-exceptions-laravel)[ Packagist](https://packagist.org/packages/davidcolquhoun/monitor-exceptions-laravel)[ RSS](/packages/davidcolquhoun-monitor-exceptions-laravel/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Monitor Exceptions (Laravel)
============================

[](#monitor-exceptions-laravel)

Lightweight Laravel client for reporting exceptions to the DataSmugglers monitoring API. Events appear in a dashboard where you can filter, search, and inspect them.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 12.x

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

[](#installation)

```
composer require davidcolquhoun/monitor-exceptions-laravel
```

The package registers its service provider automatically. It merges default config from `config/monitor-exceptions.php`; you can override values in your app by publishing the config or setting env vars.

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

[](#configuration)

Set these in your `.env`:

```
MONITOR_EXCEPTIONS_ENVIRONMENT_ID=myapp-prod
MONITOR_EXCEPTIONS_ENVIRONMENT_KEY=your-secret-key
```

- **environment\_id**: Identifies the environment (e.g. `myapp-dev`, `myapp-prod`) for grouping in the DataSmugglers UI.
- **environment\_key**: Secret key that authenticates this app with the DataSmugglers API.

If either is missing or empty, the client does not register and no exceptions are sent.

To publish the config file and edit it in your project:

```
php artisan vendor:publish --tag=monitor-exceptions-config
```

That creates `config/monitor-exceptions.php`, which reads from the same env vars by default.

Usage
-----

[](#usage)

In your Laravel app, register the client in the exception handler. In `bootstrap/app.php`:

```
use Illuminate\Foundation\Configuration\Exceptions;
use Monitor\Exceptions\MonitorExceptionsClient;

return Application::configure(basePath: dirname(__DIR__))
    // ... routing, middleware, etc.
    ->withExceptions(function (Exceptions $exceptions) {
        MonitorExceptionsClient::register($exceptions);
    })
    ->create();
```

Once registered, every exception reported to Laravel (e.g. via `report($e)`) is also sent to the monitoring API.

What gets sent
--------------

[](#what-gets-sent)

The client does not send request bodies, client IP, or query strings. It sends a JSON payload with:

FieldTypeDescription`environmentId`stringYour environment identifier.`environmentKey`stringYour environment key.`reportedByHandler`stringAlways `laravel`.`errorSeverity`int | nullPHP error level when available (e.g. `ErrorException`).`exceptionClass`stringException class name.`errorMessage`stringException message.`errorCode`string | nullException code when set.`errorFile`stringFile where the exception was thrown.`errorLine`intLine number.`stackTrace`stringStack trace as a string.`requestUrl`string | nullRequest URL without query string (null in CLI).`requestMethod`string | nullHTTP method (null in CLI).`requestHeaders`arrayRequest headers with sensitive ones stripped (empty in CLI).Sensitive headers (e.g. `authorization`, `cookie`, `x-api-key`) are removed before sending.

Behaviour
---------

[](#behaviour)

- **Registration**: If `environment_id` or `environment_key` is empty, `register()` does nothing and no handler is attached.
- **CLI**: When running in CLI, `requestUrl`, `requestMethod`, and `requestHeaders` are null/empty.
- **Failures**: Errors inside the client (e.g. network) are caught and ignored so your app’s error handling is not affected.
- **Blocking**: The HTTP send is blocking (up to the configured timeout) so the report is sent before the request ends when possible.

Testing
-------

[](#testing)

After configuring env vars, trigger an exception (e.g. `throw new \RuntimeException('Test');`) and check the DataSmugglers dashboard for the event.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance80

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

105d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/314df9bcf3a7d0fb7009ced23803107fc7b28d2d17074d172343dea387d1d6b1?d=identicon)[davidcolquhoun](/maintainers/davidcolquhoun)

---

Top Contributors

[![davidcolquhoun](https://avatars.githubusercontent.com/u/9343646?v=4)](https://github.com/davidcolquhoun "davidcolquhoun (3 commits)")

### Embed Badge

![Health badge](/badges/davidcolquhoun-monitor-exceptions-laravel/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M922](/packages/statamic-cms)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[laravel/nightwatch

The official Laravel Nightwatch package.

3618.7M31](/packages/laravel-nightwatch)[open-telemetry/opentelemetry-auto-laravel

OpenTelemetry auto-instrumentation for Laravel

582.4M8](/packages/open-telemetry-opentelemetry-auto-laravel)[guanguans/laravel-exception-notify

Monitor exception and report to the notification channels(Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

14844.4k1](/packages/guanguans-laravel-exception-notify)

PHPackages © 2026

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