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

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

guave/sentry-bundle
===================

Sentry integration for Contao 5.0+

1.0.2(1y ago)0802ISCPHPPHP ^7.4 || ^8.0

Since Jun 14Pushed 3w ago3 watchersCompare

[ Source](https://github.com/guavestudios/SentryBundle)[ Packagist](https://packagist.org/packages/guave/sentry-bundle)[ RSS](/packages/guave-sentry-bundle/feed)WikiDiscussions main Synced 3w ago

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

> [![Deprecated](https://camo.githubusercontent.com/07a0d1991ded32736e969f6f8389dc829828467761a4c0c4b63686ba3cbca2df/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f212d646570726563617465642d7265643f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/07a0d1991ded32736e969f6f8389dc829828467761a4c0c4b63686ba3cbca2df/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f212d646570726563617465642d7265643f7374796c653d666f722d7468652d6261646765)
>
> This Repo is no longer maintained. Please use [oneup/contao-sentry-bundle](https://github.com/1up-lab/contao-sentry-bundle)

Sentry Bundle
=============

[](#sentry-bundle)

This contao module allow you to integrate Sentry via Twig into your templates with [`sentry/sentry-symfony` bundle](https://github.com/getsentry/sentry-symfony/)

Requirements
------------

[](#requirements)

- Contao 5.0+
- PHP 8.1+

Install
-------

[](#install)

```
$ composer require guave/sentry-bundle
```

Usage
-----

[](#usage)

First, configure the `sentry/sentry-symfony` bundle: [Documentation](https://github.com/getsentry/sentry-symfony/#configuration-of-the-sdk)

### Recommended configuration

[](#recommended-configuration)

```
sentry:
    dsn: "https://xyz@sentry.io/xy"
    register_error_listener: false

Sentry\Monolog\Handler:
    arguments:
        $hub: '@Sentry\State\HubInterface'
        $level: !php/const Monolog\Logger::ERROR # Can be one of https://github.com/Seldaek/monolog/blob/master/doc/01-usage.md#log-levels, but System::log() only uses INFO or ERROR
        $bubble: false

monolog:
    handlers:
        sentry:
            type: service
            id: Sentry\Monolog\Handler
            priority: 100 # Higher priority than ContaoTableHandler which will stop handling afterwards (bubbling is set to true)
            bubble: false # Use bubble: true if you don't want the logs to show up in the system log (bubbling means, no monolog handlers will run afterwards)
```

### User feedback

[](#user-feedback)

On the other hand you might want to implement the [User feedback](https://docs.sentry.io/learn/user-feedback/) feature of sentry. The user feedback is primarily useful to let the users know that you've gotten notified about the issue and to let users give the opportunity to add some comments.

In order to integrate this feature, you have to alter the error page template. Place a copy of `vendor/contao/core-bundle/src/Resources/views/Error/layout.html.twig` in the directory `app/Resources/ContaoCoreBundle/views/Error/`.

Modify the copied template and place the following snippet just before the closing `` tag:

```
{% set sentry_id = ''|sentry_last_event_id %}
{% if sentry_id %}

        Sentry.init({dsn: '{{ ''|sentry_dsn }}'});
        Sentry.showReportDialog({eventId: '{{ sentry_id }}'})

        // You can also bind the "show" method to an event, e.g. to open the modal on button click
        {#document.querySelector('.btn-report').addEventListener('click', function (e) {#}
        {#    e.preventDefault();#}
        {#    Sentry.showReportDialog({eventId: '{{ sentry_id }}'})#}
        {#});#}

{% endif %}
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance67

Regular maintenance activity

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Total

3

Last Release

712d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b89566ca733f1a1ce6771b19b5030f832297471b6c7628e5ec3ffa78ddd95864?d=identicon)[guave](/maintainers/guave)

---

Top Contributors

[![gschrisstadler](https://avatars.githubusercontent.com/u/51399652?v=4)](https://github.com/gschrisstadler "gschrisstadler (9 commits)")

### Embed Badge

![Health badge](/badges/guave-sentry-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/guave-sentry-bundle/health.svg)](https://phpackages.com/packages/guave-sentry-bundle)
```

###  Alternatives

[sentry/sentry-laravel

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

1.3k122.6M185](/packages/sentry-sentry-laravel)[sentry/sentry-symfony

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

73764.5M84](/packages/sentry-sentry-symfony)[sentry/sdk

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

327137.6M163](/packages/sentry-sdk)[stayallive/wp-sentry

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

387211.1k](/packages/stayallive-wp-sentry)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1861.5M3](/packages/justbetter-magento2-sentry)[networkteam/sentry-client

A Sentry client for TYPO3. It forwards errors and exceptions to Sentry - https://sentry.io/

391.1M6](/packages/networkteam-sentry-client)

PHPackages © 2026

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