PHPackages                             schmeits/sentry-noise-filter - 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. schmeits/sentry-noise-filter

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

schmeits/sentry-noise-filter
============================

Drop-in Sentry/GlitchTip noise filter for Laravel. Install, set DSN, done.

v1.4.1(1mo ago)0268—0%MITPHPPHP ^8.2CI failing

Since Apr 13Pushed 2w agoCompare

[ Source](https://github.com/schmeits/sentry-noise-filter)[ Packagist](https://packagist.org/packages/schmeits/sentry-noise-filter)[ RSS](/packages/schmeits-sentry-noise-filter/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

Sentry Noise Filter for Laravel
===============================

[](#sentry-noise-filter-for-laravel)

A drop-in package that sets up [Sentry](https://sentry.io/) / [GlitchTip](https://glitchtip.com/) error tracking and filters common noise. Install it, set your DSN, done.

The Problem
-----------

[](#the-problem)

Laravel apps using Livewire and Filament get bombarded with errors that aren't real bugs:

- **Bot spam** — Bots hitting `/livewire/update` with invalid payloads, causing `CannotUpdateLockedPropertyException`, Filament notification TypeErrors, and `RootTagMissingFromViewException`
- **Transient infra errors** — `Connection refused`, `MySQL server has gone away`, `Redis server went away` during server updates and restarts
- **Dev leaks** — `Vite manifest not found` and dev-only command errors accidentally sent from local environments

This package silently suppresses these before they reach your error tracker, so you only see real application errors.

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

[](#installation)

```
composer require schmeits/sentry-noise-filter
```

Add your DSN to `.env`:

```
SENTRY_LARAVEL_DSN=https://your-key@your-glitchtip-or-sentry-instance/project-id
```

That's it. The package:

- Pulls in `sentry/sentry-laravel` automatically
- Auto-registers the exception handler (no `bootstrap/app.php` changes needed)
- Applies the noise filter to all outgoing error events

### Migrating from manual Sentry setup

[](#migrating-from-manual-sentry-setup)

If you previously had `Integration::handles($exceptions)` in `bootstrap/app.php`, you can remove it — the package handles this automatically:

```
// bootstrap/app.php — REMOVE this block:
->withExceptions(function (Exceptions $exceptions) {
    Integration::handles($exceptions);  // No longer needed
})
```

### Recommended .env settings

[](#recommended-env-settings)

```
SENTRY_LARAVEL_DSN=https://your-key@your-instance/project-id
SENTRY_SEND_DEFAULT_PII=false
SENTRY_TRACES_SAMPLE_RATE=0
```

- `SENTRY_SEND_DEFAULT_PII=false` — Don't send personal data (IP, cookies, user info). Set to `true` only if you need it for debugging.
- `SENTRY_TRACES_SAMPLE_RATE=0` — Disables performance monitoring. Set to `0.1` (10% of requests) if you want performance data.

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

[](#configuration)

The default configuration works out of the box. To customize the filter patterns, publish the config:

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

This creates `config/sentry-filter.php`:

```
return [
    // Disable the filter entirely
    'enabled' => env('SENTRY_FILTER_ENABLED', true),

    // Livewire/Filament bot patterns (suppress by default)
    'bot_patterns' => [
        'CannotUpdateLockedPropertyException',
        'RootTagMissingFromViewException',
        // ...
    ],

    // Transient infrastructure errors (suppress by default)
    'infra_patterns' => [
        'Connection refused',
        'MySQL server has gone away',
        'Redis server went away',
    ],

    // Local development errors (suppress by default)
    'dev_patterns' => [
        'Vite manifest not found',
        'Command "boost" is not defined',
    ],

    // Add your own project-specific patterns
    'extra_patterns' => [
        // 'Some noisy error you want to suppress',
    ],

    // Stack-aware patterns (since v1.4)
    // Each entry is a pair: ['value' => ..., 'frame' => ...]. The event is only
    // suppressed when BOTH match. Use this when the message alone is too generic
    // to filter on, but the combination with a specific vendor frame is unique.
    'stack_patterns' => [
        // Livewire 3 ErrorException from bots posting malformed snapshots.
        // Fixed in Livewire 4 with strict snapshot validation.
        [
            'value' => 'Trying to access array offset on null',
            'frame' => 'Mechanisms/HandleComponents/HandleComponents.php',
        ],
    ],
];
```

### Simple vs. stack-aware patterns

[](#simple-vs-stack-aware-patterns)

Pattern typeMatches againstUse when`bot_patterns` / `infra_patterns` / `dev_patterns` / `extra_patterns`exception type + messagethe message itself is unique enough to identify noise`stack_patterns`exception type + message AND a stacktrace framethe message is generic (e.g. `Trying to access array offset on null`), but the combination with a specific vendor frame is uniquely bot-spamBoth pattern types use case-sensitive substring matching.

How It Works
------------

[](#how-it-works)

The package does two things automatically on boot:

1. **Registers exception handling** — Equivalent to `Integration::handles()` in `bootstrap/app.php`, but done automatically via the ServiceProvider
2. **Applies noise filtering** — Hooks into Sentry's `before_send` callback. When an error is about to be sent, it checks the exception type and message against all configured patterns. Matches are suppressed, everything else passes through.

The noise filter **chains with existing filters** — if your project already has a custom `before_send` in `config/sentry.php`, it will still run after the noise filter.

Disabling
---------

[](#disabling)

Disable filtering without removing the package:

```
SENTRY_FILTER_ENABLED=false
```

Compatibility
-------------

[](#compatibility)

- PHP 8.2+
- Laravel 10, 11, 12, 13
- sentry/sentry-laravel 4.x
- Works with both Sentry and GlitchTip (Sentry-compatible API)

License
-------

[](#license)

MIT

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance95

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Total

6

Last Release

36d ago

### Community

Maintainers

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

---

Top Contributors

[![schmeits](https://avatars.githubusercontent.com/u/3034840?v=4)](https://github.com/schmeits "schmeits (8 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/schmeits-sentry-noise-filter/health.svg)

```
[![Health](https://phpackages.com/badges/schmeits-sentry-noise-filter/health.svg)](https://phpackages.com/packages/schmeits-sentry-noise-filter)
```

###  Alternatives

[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)

PHPackages © 2026

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