PHPackages                             phpnomad/sentry-integration - 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. phpnomad/sentry-integration

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

phpnomad/sentry-integration
===========================

Sentry error monitoring integration for PHPNomad

1.0.4(3w ago)0335↓91.7%MITPHPPHP &gt;=8.2

Since Feb 19Pushed 3w agoCompare

[ Source](https://github.com/phpnomad/sentry-integration)[ Packagist](https://packagist.org/packages/phpnomad/sentry-integration)[ RSS](/packages/phpnomad-sentry-integration/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)Dependencies (21)Versions (6)Used By (0)

phpnomad/sentry-integration
===========================

[](#phpnomadsentry-integration)

[![Latest Version](https://camo.githubusercontent.com/8c144f83d455d0ccb4b3b41f54b3db218222e55a6d0a52bfeb779c5b3210b002/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706e6f6d61642f73656e7472792d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/sentry-integration)[![Total Downloads](https://camo.githubusercontent.com/e0aabb5c2565a0a3b68c6cfc0b1b47e73db9e3367ea7641dbbf9ef773c05481a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706e6f6d61642f73656e7472792d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/sentry-integration)[![PHP Version](https://camo.githubusercontent.com/d4703838bcb734c3576e58811ecbba909317d52a8b74efa3785e2c5258ca838a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068706e6f6d61642f73656e7472792d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/sentry-integration)[![License](https://camo.githubusercontent.com/26cd7e99e3a36de7234750aa2d2173a38b5fe2d183c9272d45645408b62effce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068706e6f6d61642f73656e7472792d696e746567726174696f6e2e737667)](https://packagist.org/packages/phpnomad/sentry-integration)

Integrates Sentry with PHPNomad's logging. A listener subscribes to `ItemLogged` events from `phpnomad/core`, forwards WARNING and above to Sentry as captured events, and records lower-severity entries as breadcrumbs so they appear as context on the next error. Severity mapping, capture rules, and DSN sourcing are all override points.

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

[](#installation)

```
composer require phpnomad/sentry-integration
```

What this provides
------------------

[](#what-this-provides)

- A listener that forwards `ItemLogged` events to Sentry, with automatic severity mapping from PHPNomad log levels to Sentry severities.
- A `SentryCaptureGate` interface with a default implementation that captures WARNING and above. Override it to change what becomes an event versus a breadcrumb.
- A `SentryDsnProvider` interface so the host application supplies the DSN from its own configuration source (environment variables, secrets manager, config file).

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

[](#requirements)

- `phpnomad/core` (provides the `ItemLogged` event)
- `phpnomad/event` and `phpnomad/loader` for listener registration
- `sentry/sentry` `^4.0`
- PHP 8.2 or later

Usage
-----

[](#usage)

Implement `SentryDsnProvider` with your application's DSN source, bind it in an initializer, and register `SentryInitializer` in your loader chain.

```
use PHPNomad\Loader\Interfaces\HasClassDefinitions;
use PHPNomad\Sentry\Interfaces\SentryDsnProvider;

class EnvDsnProvider implements SentryDsnProvider
{
    public function getDsn(): string
    {
        return $_ENV['SENTRY_DSN'] ?? '';
    }
}

class AppSentryInitializer implements HasClassDefinitions
{
    public function getClassDefinitions(): array
    {
        return [EnvDsnProvider::class => SentryDsnProvider::class];
    }
}
```

Add `SentryInitializer` and `AppSentryInitializer` to your loader. From that point forward, any `$logger->error()` or `$logger->critical()` call is forwarded to Sentry without further application changes. If the DSN is empty the hub no-ops, and all Sentry calls are wrapped in try/catch so monitoring never crashes the host app.

Documentation
-------------

[](#documentation)

Framework docs live at [phpnomad.com](https://phpnomad.com). For Sentry client configuration, see the [Sentry PHP SDK documentation](https://docs.sentry.io/platforms/php/).

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance96

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Total

5

Last Release

21d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e6206223bd6f2a57b8ac80605b1b5c3521faaec18ad3f20f25fb728a9a13784?d=identicon)[tstandiford](/maintainers/tstandiford)

---

Top Contributors

[![alexstandiford](https://avatars.githubusercontent.com/u/8210827?v=4)](https://github.com/alexstandiford "alexstandiford (7 commits)")

---

Tags

error-monitoringframeworkintegrationloggingphpphpnomadplatform-agnosticsentry

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phpnomad-sentry-integration/health.svg)

```
[![Health](https://phpackages.com/badges/phpnomad-sentry-integration/health.svg)](https://phpackages.com/packages/phpnomad-sentry-integration)
```

###  Alternatives

[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k127.1M203](/packages/sentry-sentry-laravel)[sentry/sentry-symfony

Symfony integration for Sentry (http://getsentry.com)

74666.1M96](/packages/sentry-sentry-symfony)[sentry/sdk

This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.

327139.0M166](/packages/sentry-sdk)[stayallive/wp-sentry

A (unofficial) WordPress plugin to report PHP and JavaScript errors to Sentry.

385220.0k](/packages/stayallive-wp-sentry)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1861.6M3](/packages/justbetter-magento2-sentry)[networkteam/sentry-client

A Sentry client for TYPO3. It forwards errors and exceptions to Sentry - https://sentry.io/

391.1M7](/packages/networkteam-sentry-client)

PHPackages © 2026

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