PHPackages                             dziki/monolog-sentry-bundle - 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. dziki/monolog-sentry-bundle

AbandonedArchivedSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

dziki/monolog-sentry-bundle
===========================

Improve logging to Sentry with user, user agent, revision and Symfony version data

v1.1.0(5y ago)3178.9k↓50%7MITPHPPHP &gt;=7.1

Since Aug 2Pushed 5y ago3 watchersCompare

[ Source](https://github.com/mleczakm/monolog-sentry-bundle)[ Packagist](https://packagist.org/packages/dziki/monolog-sentry-bundle)[ RSS](/packages/dziki-monolog-sentry-bundle/feed)WikiDiscussions master Synced 1mo ago

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

Monolog Sentry Bundle
=====================

[](#monolog-sentry-bundle)

[![Latest Stable Version](https://camo.githubusercontent.com/af18c9e48c45994afd75c20f1c3b553f5870fd2f7ded9fa69d157dc8b14c16f2/68747470733a2f2f706f7365722e707567782e6f72672f647a696b692f6d6f6e6f6c6f672d73656e7472792d62756e646c652f762f737461626c65)](https://packagist.org/packages/dziki/monolog-sentry-bundle)[![Build Status](https://camo.githubusercontent.com/3cb6f61275bbc824f847e3f774c5e2d55a3a2c2b87af1f9bdadb9d1b897d7796/68747470733a2f2f7472617669732d63692e6f72672f6d6c65637a616b6d2f6d6f6e6f6c6f672d73656e7472792d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mleczakm/monolog-sentry-bundle)[![Coverage Status](https://camo.githubusercontent.com/57a88193cd8130ff06fe8d674be2365c430be5c44bc6886d788ca8f0df25c7aa/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d6c65637a616b6d2f6d6f6e6f6c6f672d73656e7472792d62756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mleczakm/monolog-sentry-bundle?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c1b4ee41ffd78cd37a56e6f8b2d9e9abd988d932fc1e735a110d72a335da2c18/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6c65637a616b6d2f6d6f6e6f6c6f672d73656e7472792d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mleczakm/monolog-sentry-bundle/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/a154f2cb98756e4fc0b2433e7dbeaa358aa9b0d9fda801a182fc70a58556b861/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f35333962353135342d616432612d343431372d626265612d6463313361366636396330632f6d696e692e706e67)](https://insight.sensiolabs.com/projects/539b5154-ad2a-4417-bbea-dc13a6f69c0c)[![License](https://camo.githubusercontent.com/09974ff2cd58f94cd00906ebe859a50d3f27abfe7af6973a1dc5b6cf2980e2be/68747470733a2f2f706f7365722e707567782e6f72672f647a696b692f6d6f6e6f6c6f672d73656e7472792d62756e646c652f6c6963656e7365)](https://packagist.org/packages/dziki/monolog-sentry-bundle)[![FOSSA Status](https://camo.githubusercontent.com/d11a1da70d3fc76ac5eea65a468fbd5f007d47d9b58334371b2022567b65a33a/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466d6c65637a616b6d2532466d6f6e6f6c6f672d73656e7472792d62756e646c652e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmleczakm%2Fmonolog-sentry-bundle?ref=badge_shield)

Bundle for appending useful data to [Monolog](https://github.com/Seldaek/monolog) log records like username, parsed user-agent header, host name, Symfony version, commit hash and a lot more - you can provide custom tags to be added to all your logs.

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

[](#installation)

Install bundle with `composer require dziki/monolog-sentry-bundle` command.

TL;DR
-----

[](#tldr)

Comparison of exactly same error handled by default [monolog raven handler](#hints) with `sentry/sentry` package client with bundle turned off and on with some [basic config](#full-basic-config). As you can see - after turning bundle on - browser, user, breadcrumbs and some valuable tags showed up, making your error logs much easier to read.

### Before

[](#before)

[![before](https://user-images.githubusercontent.com/3474636/45269343-d8c4d700-b48c-11e8-89b3-8a6a0e602c12.png)](https://user-images.githubusercontent.com/3474636/45269343-d8c4d700-b48c-11e8-89b3-8a6a0e602c12.png)

After
-----

[](#after)

[![after](https://user-images.githubusercontent.com/3474636/45269349-e1b5a880-b48c-11e8-9143-53058e67e757.png)](https://user-images.githubusercontent.com/3474636/45269349-e1b5a880-b48c-11e8-9143-53058e67e757.png)

Enable the Bundle
-----------------

[](#enable-the-bundle)

Add entry to `config/bundles.php`:

```
return [
    // ...
    Dziki\MonologSentryBundle\MonologSentryBundle::class => ['all' => true],
];
```

or to `app/AppKernel.php`

```
