PHPackages                             bigfork/silverstripe-sentry-handler - 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. bigfork/silverstripe-sentry-handler

ActiveSilverstripe-vendormodule[Logging &amp; Monitoring](/categories/logging)

bigfork/silverstripe-sentry-handler
===================================

A standalone Monolog handler for Sentry

3.0.0(9mo ago)17.8k↓50%1BSD-3-ClausePHPPHP ^8

Since Feb 7Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/bigfork/silverstripe-sentry-handler)[ Packagist](https://packagist.org/packages/bigfork/silverstripe-sentry-handler)[ RSS](/packages/bigfork-silverstripe-sentry-handler/feed)WikiDiscussions master Synced 1mo ago

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

Silverstripe Sentry Handler
===========================

[](#silverstripe-sentry-handler)

Minimalistic module designed to make it easier to obtain a `Sentry\Monolog\Handler` instance for consumption by Monolog loggers.

⚠️ **If you simply want errors logged to Sentry, you’re probably better off using the [`phptek/sentry`](https://github.com/phptek/silverstripe-sentry) module instead of this one.**

This module differs in that its goal is to make it easier to use Sentry with multiple Logger instances that have different configuration options.

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

[](#installation)

`composer require bigfork/silverstripe-sentry-handler`

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

[](#configuration)

Simply add a `SENTRY_DSN` environment variable containing the DSN provided in the Sentry UI.

Customisation
-------------

[](#customisation)

By default, this module will push an additional handler to the default `Psr\Log\LoggerInterface.errorhandler` service which will push errors to Sentry (similar to the `phptek/sentry` module). You can disable this behaviour with:

```
SilverStripe\Core\Injector\Injector:
  Psr\Log\LoggerInterface.errorhandler:
    calls:
      pushSentryErrorHandler: null
```

You can configure another `Sentry\Monolog\Handler` instance by using the `SentryHubFactory` class to help build out your Sentry hub to be passed the handler:

```
SilverStripe\Core\Injector\Injector:
  # Build a custom Hub object which holds our Sentry config, will be passed to the handler below
  MySentryHub:
    factory: 'Bigfork\SilverstripeSentryHandler\SentryHubFactory'
      constructor:
        options:
          dsn: '`SENTRY_DSN`'
          tags:
            - 'sometag'
          default_integrations: false
          integrations:
            - '%$MyCustomIntegrationClass'

  # Build Sentry\Monolog\Handler instance, to be pushed to logger above
  MySentryMonologHandler:
    class: 'Sentry\Monolog\Handler'
    constructor:
      - '%$MySentryHub' # Our custom hub object defined above
      - 'info' # Send anything logged at "info" level or above

  # Finally, build the logger service - access with Injector::inst()->get('MyMonologLogger')
  MyMonologLogger:
    type: 'singleton'
    class: 'Monolog\Logger'
    constructor:
      - 'myloggername'
    calls:
      pushSentryHandler: [ pushHandler, ['%$MySentryMonologHandler'] ] # Handler instance defined above
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance58

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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

Recently: every ~203 days

Total

13

Last Release

271d ago

Major Versions

1.1.0 → 2.0.02023-03-08

1.2.x-dev → 2.1.02023-05-31

2.x-dev → 3.0.02025-08-20

PHP version history (3 changes)1.0.0PHP ^7.4 || ^8.0

2.0.0PHP ^8.0

3.0.0PHP ^8

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/203294386?v=4)[-&gt; lozcalver](/maintainers/kinglozzer)[@kinglozzer](https://github.com/kinglozzer)

---

Top Contributors

[![lozcalver](https://avatars.githubusercontent.com/u/1655548?v=4)](https://github.com/lozcalver "lozcalver (6 commits)")

### Embed Badge

![Health badge](/badges/bigfork-silverstripe-sentry-handler/health.svg)

```
[![Health](https://phpackages.com/badges/bigfork-silverstripe-sentry-handler/health.svg)](https://phpackages.com/packages/bigfork-silverstripe-sentry-handler)
```

###  Alternatives

[sentry/sentry-laravel

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

1.3k114.3M154](/packages/sentry-sentry-laravel)[sentry/sentry-symfony

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

73661.4M66](/packages/sentry-sentry-symfony)[sentry/sdk

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

328134.8M151](/packages/sentry-sdk)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[notamedia/yii2-sentry

Yii2 logger for Sentry

1272.0M2](/packages/notamedia-yii2-sentry)[stayallive/wp-sentry

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

379197.9k](/packages/stayallive-wp-sentry)

PHPackages © 2026

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