PHPackages                             shiftonelabs/php-rollbar-extensions - 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. shiftonelabs/php-rollbar-extensions

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

shiftonelabs/php-rollbar-extensions
===================================

Adds extra strategies for PHP Rollbar customization.

1.0.0(6y ago)0253MITPHPPHP &gt;=5.5.0CI failing

Since Dec 13Pushed 6y ago1 watchersCompare

[ Source](https://github.com/shiftonelabs/php-rollbar-extensions)[ Packagist](https://packagist.org/packages/shiftonelabs/php-rollbar-extensions)[ Docs](https://github.com/shiftonelabs/php-rollbar-extensions)[ RSS](/packages/shiftonelabs-php-rollbar-extensions/feed)WikiDiscussions master Synced 1mo ago

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

php-rollbar-extensions
======================

[](#php-rollbar-extensions)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b41dd91d4b789359555a57b48d154de3805537f217cc554669f8dc1638b6a222/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686966746f6e656c6162732f7068702d726f6c6c6261722d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shiftonelabs/php-rollbar-extensions)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/d411efaa311b2146b0d61fe327f2822194966d3c1a50feeea2dbee3d539c467e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f73686966746f6e656c6162732f7068702d726f6c6c6261722d657874656e73696f6e732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/shiftonelabs/php-rollbar-extensions)[![Coverage Status](https://camo.githubusercontent.com/670b2b7bb29cb0d18e4bb138932b46badbb8bba07c6e9f410b3c037ca101f71d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73686966746f6e656c6162732f7068702d726f6c6c6261722d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/shiftonelabs/php-rollbar-extensions/code-structure)[![Quality Score](https://camo.githubusercontent.com/dc7afeac9c82d87fe1e81a4ffe1c446e506ea8dc252110303255e780e01247ef/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73686966746f6e656c6162732f7068702d726f6c6c6261722d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/shiftonelabs/php-rollbar-extensions)[![Total Downloads](https://camo.githubusercontent.com/75bbf568bcb5ba650ad8e579d3e64ae14ed233762e71eec9e1b060306b574837/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686966746f6e656c6162732f7068702d726f6c6c6261722d657874656e73696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shiftonelabs/php-rollbar-extensions)

This package provides extra strategies to be used with the Rollbar SDK for PHP. The base Rollbar SDK comes with some default strategies for truncation, but they don't always do everything that is needed. The configuration allows for specifying custom strategies for transforming, truncating, etc, and this package aims to provide some of these custom strategies.

Install
-------

[](#install)

Via Composer

```
$ composer require shiftonelabs/php-rollbar-extensions
```

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

[](#configuration)

Rollbar configuration is dependent on the framework/application being used.

Rollbar documentation for installing rollbar for PHP:

Rollbar configuration options:

Usage
-----

[](#usage)

This package provides a set of classes that can be provided to the Rollbar configuration. For the most part, usage of this queue driver is the same as the built in queue drivers. There are, however, a few extra things to consider when working with Amazon's SQS FIFO queues.

### Custom Data Method

[](#custom-data-method)

> Allows creating dynamic custom data on runtime during error reporting. The callable taking two parameters `$toLog` (the context of what's being logged) and `$context` (additional context data provided in the config). You provide `$context` by adding `custom_data_method_context` key to the `$extra` or `$context` parameters `Rollbar::log` or `RollbarLogger::log`.
>
> \-- [Rollbar config reference](https://docs.rollbar.com/docs/php-configuration-reference)

To specify a custom data method to use, set the `custom_data_method` key of the Rollbar config to a new instance of an invocable Custom Data Method class. These classes should implement the `\ShiftOneLabs\PhpRollbarExtensions\CustomDataInterface` interface.

**No custom data methods available yet.**

### Custom Truncation

[](#custom-truncation)

> A fully qualified name of your custom truncation strategy class. It has to inherit from `\Rollbar\Truncation\AbstractStrategy`. This custom strategy will be applied before the built-in strategies.
>
> \-- [Rollbar config reference](https://docs.rollbar.com/docs/php-configuration-reference)

To specify a custom truncation to use, set the `custom_truncation` key of the Rollbar config to the fully qualified name of the class to use.

**No custom truncation methods available yet.**

### Transformers

[](#transformers)

From Rollbar:

> The class to be used to transform the payload before it gets prepared for sending to Rollbar API. It has to implement `\Rollbar\TransformerInterface`.
>
> \-- [Rollbar config reference](https://docs.rollbar.com/docs/php-configuration-reference)

To specify a transformer to use, set the `transformer` key of the Rollbar config to the fully qualified name of the class to use.

Available transformers:

TransformerDescription`AddExceptionPropertiesTransformer`Adds all properties of the exception to the Rollbar log.#### AddExceptionPropertiesTransformer

[](#addexceptionpropertiestransformer)

When an exception is logged to Rollbar, only the basic exception information is sent to Rollbar (exception name, message, code, line number, file, previous exception, and stack trace). However, if you have created a custom exception with additional properties, the values of those properties are not sent to Rollbar by default. Sometimes this information is very valuable in attempting to debug the issue.

The `AddExceptionPropertiesTransformer` transformer will add all data stored on the exception to the "custom" element of the Rollbar payload, under a new "properties" key. This includes all defined public, protected, and private properties, as well as any properties dynamically assigned at runtime. This transformer also traverses the exception chain, so all the properties for the set "previous" exceptions will be reported, as well. This custom data will be displayed in Rollbar for each occurrence.

Example configuration: `'transformer' => \ShiftOneLabs\PhpRollbarExtensions\Transformers\AddExceptionPropertiesTransformer::class`

Contributing
------------

[](#contributing)

Contributions are welcome. Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Patrick Carlo-Hickman](https://github.com/patrickcarlohickman)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

2349d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/359fc390650d98265cef526a899c6bc79cd9030e32d17a472af34f38ed70fb2c?d=identicon)[patrickcarlohickman](/maintainers/patrickcarlohickman)

---

Top Contributors

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

---

Tags

phprollbar

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/shiftonelabs-php-rollbar-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/shiftonelabs-php-rollbar-extensions/health.svg)](https://phpackages.com/packages/shiftonelabs-php-rollbar-extensions)
```

###  Alternatives

[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[jenssegers/rollbar

Rollbar error monitoring integration for Laravel projects

3301.1M2](/packages/jenssegers-rollbar)[baibaratsky/yii2-rollbar

Rollbar for Yii2

35130.5k](/packages/baibaratsky-yii2-rollbar)

PHPackages © 2026

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