+Pluswerk TYPO3 extension: Sentry Client

Installs: 11 402

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 0

Open Issues: 1


3.2.0 2023-10-20 10:06 UTC

This package is auto-updated.

Last update: 2023-11-20 10:17:53 UTC


GitHub License

Pluswerk TYPO3 Sentry PHP Client


  • has LogWriter that enables you to write any log entries into sentry
  • Logs all exceptions caught by the TYPO3 error handling.
  • Logs all exceptions that are caught by the TYPO3 ProductionExceptionHandler ContentObject.
    • This handles the Oops, an error occurred! code: 2023080912232477707e9b errors in your site.
    • It displays the error message as normal + a link with only a   after the code. So a normal user will not see the link.
    • The link directly opens the sentry with the correct error.


  • Add environment variables:
    • SENTRY_ORGANISATION=sentry (optional) if the organisation of your sentry is different. is used in eg. the Oops, an error occurred! Code: 2023080912232477707e9b
    • DISABLE_SENTRY (optional) Disable Sentry by setting this to 1
    • SENTRY_QUEUE (optional) Enable queue system by setting this to 1
    • SENTRY_ERRORS_TO_REPORT (optional) The Errors to Report as number, e.g. 4096 for E_REVOERABLE_ERROR
  • Add the following line to your AdditionalConfiguration.php
    • (new \Pluswerk\Sentry\Bootstrap())->initializeHandler();
  • If you enabled SENTRY_QUEUE
    • Add typo3 pluswerk:sentry:flush to your scheduling service
    • Add environment before the command if you want to report errors while running the command SENTRY_QUEUE=0 typo3 pluswerk:sentry:flush


The Extension comes with a couple of settings in the TYPO3-Backend:

  • force_disable_sentry -> Forcefully override the ENV by disabling Sentry in backend
  • enable_git_hash_releases (default yes) -> Automatically track releases with the current git hash (only works if git is installed)

Configuring the scope

Sometimes it might be necessary to additionally configure the scope of a sentry event.
For this, the method \Pluswerk\Sentry\Sentry::withScope($exception, $scopeCallback) comes in play.
The arguments are similar to The first argument requires the exception to be thrown and the second is a callback, for where you can apply custom settings to the Sentry Scope.
There is no need to additionally write captureException within that callback.


Sentry::getInstance()->withScope($exception, fn(Scope $scope) => $scope->setTag('oops_code', $oopsCode));


You can write this in your additional.php if you want all warnings from the TYPO3 log to be logged in Sentry:

    $GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'][LogLevel::WARNING] = [
        SyslogWriter::class => [],
        SentryLogger::class => [],