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

ActiveNeos-package[Logging &amp; Monitoring](/categories/logging)

flownative/sentry
=================

A Sentry integration for Neos Flow

v3.2.0(5mo ago)546.5k↓32.9%9[1 PRs](https://github.com/flownative/flow-sentry/pulls)1MITPHPPHP ^8.1

Since Aug 20Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/flownative/flow-sentry)[ Packagist](https://packagist.org/packages/flownative/sentry)[ RSS](/packages/flownative-sentry/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (36)Used By (1)

[![MIT license](https://camo.githubusercontent.com/4661abfe916186acde514558e7f040833cb63ba7098401a51ce339cbb2b4cf9e/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](http://opensource.org/licenses/MIT)[![Packagist](https://camo.githubusercontent.com/00f335a2bd5e9fe916d3d5cdab2eeb9943f7c3b4b367ce1452954c0b4429385c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c6f776e61746976652f73656e7472792e737667)](https://packagist.org/packages/flownative/sentry)[![Maintenance level: Love](https://camo.githubusercontent.com/b24fe73a7439225808a806c9f1032014adf4933b5774648c0174cf0de1d56401/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e74656e616e63652d2545322539392541312545322539392541312545322539392541312d6666363962342e737667)](https://www.flownative.com/en/products/open-source.html)

Sentry integration for Flow 8.x and 9.x
=======================================

[](#sentry-integration-for-flow-8x-and-9x)

This [Flow](https://flow.neos.io) package allows you to automate reporting of errors to [Sentry](https://www.sentry.io)

Key Features
------------

[](#key-features)

This package makes sure that throwables and exceptions logged in a Flow application also end up in Sentry. This is done by implementing Flow's `ThrowableStorageInterface` and configuring the default implementation.

This packages takes some extra care to clean up paths and filenames of stacktraces so you get a good overview while looking at an issue in the Sentry UI.

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

[](#installation)

The Sentry integration is installed as a regular Flow package via Composer. For your existing project, simply include `flownative/sentry`into the dependencies of your Flow or Neos distribution:

```
$ composer require flownative/sentry
```

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

[](#configuration)

You need to at least specify a DSN to be used as a logging target. Apart from that, you can configure the Sentry environment and release. These options can either be set in the Flow settings or, more conveniently, by setting the respective environment variables:

- `SENTRY_DSN`
- `SENTRY_ENVIRONMENT`
- `SENTRY_RELEASE`

The package uses these environment variables by default in the settings:

```
Flownative:
  Sentry:
    dsn: "%env:SENTRY_DSN%"
    environment: "%env:SENTRY_ENVIRONMENT%"
    release: "%env:SENTRY_RELEASE%"
```

The error sample rate of Sentry can be set using

```
Flownative:
  Sentry:
    sampleRate: 1
```

The default is 1 – 100% percent of all errors are sampled.

The traces sample rate for performance monitoring can be set using

```
Flownative:
  Sentry:
    tracesSampleRate: 0.25
```

The default is 0 – performance tracing is disabled. Set a value between 0 and 1 to enable tracing (e.g. 0.25 for 25% of transactions).

The PHP error level for errors automatically detected by the Sentry SDK can be set using:

```
Flownative:
  Sentry:
    errorLevel: '%E_ERROR%'
```

The default is `null`, that makes Sentry use the value returned by the `error_reporting()` function. The available error levels are documented at [PHP error constants](https://www.php.net/manual/en/errorfunc.constants.php).

**Beware:** a low error log level can lead to your application not loading anymore and your Sentry account being flooded with error messages.

Throwables (that includes exceptions and runtime errors) are logged as Sentry events. You may specify a list of exception types, exception message regular expressions or exception codes which should not be which should not be recorded.

```
Flownative:
  Sentry:
    capture:
      excludeExceptionTypes:
        'Neos\Flow\Mvc\Controller\Exception\InvalidControllerException': true
      excludeExceptionMessagePatterns:
          - '/^Warning: fopen\(.*/'
      excludeExceptionCodes:
          - 1391972021
```

By default all Flow exceptions with a status code of 404 are ignored. In case you want to see those in Sentry, you can include them case-by-case like so:

```
Flownative:
  Sentry:
    capture:
      excludeExceptionTypes:
        'Neos\Flow\Mvc\Controller\Exception\InvalidControllerException': false
        'Neos\Flow\Mvc\Exception\NoSuchControllerException': false
```

Additional Data
---------------

[](#additional-data)

Exceptions declared in an application can optionally implement `WithAdditionalDataInterface` provided by this package. If they do, the array returned by `getAdditionalData()` will be visible in the "additional data" section in Sentry.

Note that the array must only contain values of simple types, such as strings, booleans or integers.

Logging integration
-------------------

[](#logging-integration)

### Breadcrumb handler

[](#breadcrumb-handler)

This package configures a logging backend to add messages as breadcrumbs to be sent to Sentry when an exception happens. This provides more information on what happened before an exception.

If you want to include the security and query logging into this handling, feel free to add this to the Flow settings:

```
Neos:
  Flow:
    log:
      psr3:
        Neos\Flow\Log\PsrLoggerFactory:
          securityLogger:
            default:
              class: 'Flownative\Sentry\Log\SentryFileBackend'
          sqlLogger:
            default:
              class: 'Flownative\Sentry\Log\SentryFileBackend'
```

For more information on breadcrumbs see the Sentry documentation at

### Monolog

[](#monolog)

In case you want to store all log messages in Sentry, one way is to configure Flow to use monolog for logging and then add the `Sentry\Monolog\Handler` to the setup.

Keep in mind that the breadcrumb handler provided by this package might be disabled when doing this, depending on your configuration. Sentry provides a monolog integration for that purpose, see `Sentry\Monolog\BreadcrumbHandler`and .

Testing the Client
------------------

[](#testing-the-client)

This package provides a command controller which allows you to log a test message and a test exception.

Run the following command in your terminal to test your configuration:

```
./flow sentry:test
Testing Sentry setup …
Using the following configuration:
+-------------+----------------------------------------------------------+
| Option      | Value                                                    |
+-------------+----------------------------------------------------------+
| DSN         | https://abc123456789abcdef1234567890ab@sentry.io/1234567 |
| Environment | development                                              |
| Release     | dev                                                      |
| Server Name | test_container                                           |
| Sample Rate | 1                                                        |
+-------------+----------------------------------------------------------+

This command will now throw an exception for testing purposes.

Test exception in ThrowingClass

  Type: Flownative\Sentry\Test\SentryClientTestException
  Code: 1662712736
  File: Data/Temporary/Development/SubContextBeach/SubContextInstance/Cache/Code/Fl
        ow_Object_Classes/Flownative_Sentry_Test_ThrowingClass.php
  Line: 41

Nested exception:
Test "previous" exception in ThrowingClass

  Type: RuntimeException
  Code: 1662712735
  File: Data/Temporary/Development/SubContextBeach/SubContextInstance/Cache/Code/Fl
        ow_Object_Classes/Flownative_Sentry_Test_ThrowingClass.php
  Line: 40

Open Data/Logs/Exceptions/202411181211403b652e.txt for a full stack trace.

```

There are two more test modes for message capturing and error handling:

- `./flow sentry:test --mode message`
- `./flow sentry:test --mode error`

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance72

Regular maintenance activity

Popularity36

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~82 days

Total

35

Last Release

159d ago

Major Versions

0.3.0 → v1.0.02021-03-03

v1.4.2 → v2.0.02024-11-15

v2.1.1 → v3.0.02025-11-27

PHP version history (5 changes)v1.0.0PHP ^7.4

v1.0.1PHP 7.4.\* || 8.0.\*

v1.1.2PHP 7.4.\* || 8.0.\* || 8.1.\*

v1.2.2PHP ^7.4 || ^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/95582?v=4)[Robert Lemke](/maintainers/robertlemke)[@robertlemke](https://github.com/robertlemke)

![](https://avatars.githubusercontent.com/u/10280881?v=4)[Flownative](/maintainers/flownative)[@flownative](https://github.com/flownative)

---

Top Contributors

[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (46 commits)")[![robertlemke](https://avatars.githubusercontent.com/u/95582?v=4)](https://github.com/robertlemke "robertlemke (42 commits)")[![das-nagnag](https://avatars.githubusercontent.com/u/5262896?v=4)](https://github.com/das-nagnag "das-nagnag (3 commits)")[![kitsunet](https://avatars.githubusercontent.com/u/324408?v=4)](https://github.com/kitsunet "kitsunet (3 commits)")[![gradinarufelix](https://avatars.githubusercontent.com/u/4405087?v=4)](https://github.com/gradinarufelix "gradinarufelix (3 commits)")[![paavo](https://avatars.githubusercontent.com/u/1118783?v=4)](https://github.com/paavo "paavo (1 commits)")[![pKallert](https://avatars.githubusercontent.com/u/91674611?v=4)](https://github.com/pKallert "pKallert (1 commits)")[![DavidSporer](https://avatars.githubusercontent.com/u/1636571?v=4)](https://github.com/DavidSporer "DavidSporer (1 commits)")

---

Tags

flowneos-flowsentry

### Embed Badge

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

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

###  Alternatives

[sentry/sentry-laravel

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

1.3k114.3M154](/packages/sentry-sentry-laravel)[sentry/sentry-symfony

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

73661.4M66](/packages/sentry-sentry-symfony)[sentry/sdk

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

328134.8M151](/packages/sentry-sdk)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[stayallive/wp-sentry

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

379197.9k](/packages/stayallive-wp-sentry)[mito/yii2-sentry

Yii 2 extension for Sentry

92377.7k](/packages/mito-yii2-sentry)

PHPackages © 2026

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