PHPackages                             classmarkets/raven-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. classmarkets/raven-bundle

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

classmarkets/raven-bundle
=========================

Display sentry event ids on error pages

3.0.0(6y ago)015.2k2[1 PRs](https://github.com/classmarkets/raven-bundle/pulls)MITPHPPHP &gt;= 7.1

Since Nov 6Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (10)Versions (11)Used By (0)

raven-bundle
============

[](#raven-bundle)

[![Build Status](https://camo.githubusercontent.com/83d96bf546f2eaa173f1180b0ab68da90ce94df8057fbdd56c05dc8963fe77d8/68747470733a2f2f7472617669732d63692e6f72672f636c6173736d61726b6574732f726176656e2d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/classmarkets/raven-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0897e3530ff63e1e4be8cd0fd8b797218354d52c233fb03d1adacc27e1aa12aa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636c6173736d61726b6574732f726176656e2d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/classmarkets/raven-bundle/?branch=master)

Are you using [sentry](https://getsentry.com) for exception monitoring in Symfony 2? Good! Now let's show meaningful error pages to your users.

Sentry generates ids for each event it receives. This bundle adds a Twig function that let's you access those event ids in error page templates:

```
Oh no, something went wrong!

{% if exception is defined %}
    {% set eventId = sentry_event_id(exception) %}

    {% if eventId is not empty %}

            The good news is that our team has been notified and is probably
            working on a solution already.

            Error Code: {{ eventId }}

    {% endif %}
{% endif %}
```

You can also lookup event ids wherever the DIC is available like this:

```
