PHPackages                             twineis/raven-php - 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. twineis/raven-php

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

twineis/raven-php
=================

Sentry (Raven) error monitoring for Laravel and Lumen with send in background via queues

0.5.0(9y ago)1018.1k3[1 issues](https://github.com/twineis/raven-php/issues)MITPHPPHP &gt;=5.5.9

Since Apr 20Pushed 7y ago3 watchersCompare

[ Source](https://github.com/twineis/raven-php)[ Packagist](https://packagist.org/packages/twineis/raven-php)[ RSS](/packages/twineis-raven-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (6)DependenciesVersions (7)Used By (0)

Raven PHP
=========

[](#raven-php)

> Sentry (Raven) error monitoring for Laravel and Lumen with send in background via queues

[![License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://www.opensource.org/licenses/MIT)[![Latest Version](https://camo.githubusercontent.com/92fbdf0927b625daa065de91741bf739bc68147017b74d4d876db0a7fbd57aed/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7477696e6569732f726176656e2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/twineis/raven-php)[![Total Downloads](https://camo.githubusercontent.com/766e5d280bf0a3d2aab8f3d40aedd99c23860e449256104e203fed048e3f2e70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7477696e6569732f726176656e2d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/twineis/raven-php)

Sentry (Raven) error monitoring for Laravel and Lumen with send in background via queues. This will add a listener to Laravel's existing log system. It makes use to Laravel's queues to push messages into the background without slowing down the application.

[![rollbar](https://camo.githubusercontent.com/e111533d2a1d538e59caa9df9ac3319447ddb9f128ad393531d46b02743ab714/68747470733a2f2f7777772e67657473656e7472792e636f6d2f5f7374617469632f67657473656e7472792f696d616765732f6865726f2e706e67)](https://camo.githubusercontent.com/e111533d2a1d538e59caa9df9ac3319447ddb9f128ad393531d46b02743ab714/68747470733a2f2f7777772e67657473656e7472792e636f6d2f5f7374617469632f67657473656e7472792f696d616765732f6865726f2e706e67)

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

[](#installation)

Install the latest version with:

```
$ composer require twineis/raven-php
```

For Laravel add the service provider in `config/app.php`:

```
Twine\Raven\Providers\LaravelServiceProvider::class,
```

Register the Raven alias:

```
'Raven' => Twine\Raven\Facades\Raven::class,
```

For Lumen add the following to `bootstrap/app.php`

```
$app->register(Twine\Raven\Providers\LumenServiceProvider::class);
```

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

[](#configuration)

Publish the included configuration file **(Laravel only)**:

```
$ php artisan vendor:publish
```

Change the Sentry DSN by using the `RAVEN_DSN` env variable or changing the config file:

```
RAVEN_DSN=your-raven-dsn
```

This library uses the queue system, make sure your `config/queue.php` file is configured correctly. You can also specify the connection and the queue to use in the raven config. The connection and queue must exist in `config/queue.php`. These can be set using the `RAVEN_QUEUE_CONNECTION` for connection and `RAVEN_QUEUE_NAME` for the queue.

```
RAVEN_QUEUE_CONNECTION=redis
RAVEN_QUEUE_NAME=error
```

**The job data can be quite large, ensure you are using a queue that can support large data sets like `redis` or `sqs`**. If the job fails to add into the queue, it will be sent directly to sentry, slowing down the request, so its not lost.

Usage
-----

[](#usage)

To monitor exceptions, simply use the `Log` facade or helper:

```
Log::error($exception);

// or

app('log')->error($exception);
```

You can change the logs used by changing the log level in the config by modifying the env var.

```
RAVEN_LEVEL=error
```

### Event Id

[](#event-id)

There is a method to get the **last** event id so it can be used on things like the error page.

```
Raven::getLastEventId();
```

### Context information

[](#context-information)

You can pass additional information as context like this:

```
Log::error('Oops, Something went wrong', [
    'user' => ['name' => $user->name, 'email' => $user->email]
]);
```

Credits
-------

[](#credits)

This package was inspired [rcrowe/Raven](https://github.com/rcrowe/Raven).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~69 days

Recently: every ~76 days

Total

6

Last Release

3328d ago

### Community

---

Top Contributors

[![pulkitjalan](https://avatars.githubusercontent.com/u/4124930?v=4)](https://github.com/pulkitjalan "pulkitjalan (22 commits)")[![nirradian](https://avatars.githubusercontent.com/u/9128182?v=4)](https://github.com/nirradian "nirradian (1 commits)")[![tremby](https://avatars.githubusercontent.com/u/199635?v=4)](https://github.com/tremby "tremby (1 commits)")

### Embed Badge

![Health badge](/badges/twineis-raven-php/health.svg)

```
[![Health](https://phpackages.com/badges/twineis-raven-php/health.svg)](https://phpackages.com/packages/twineis-raven-php)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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