netlogix/nxsentry

Sentry integration

Installs: 5 068

Dependents: 0

Suggesters: 1

Security: 0

Stars: 0

Watchers: 5

Forks: 0

Open Issues: 0

Type:typo3-cms-extension

1.1.3 2022-12-22 14:07 UTC

This package is auto-updated.

Last update: 2024-10-10 10:16:11 UTC


README

MIT license Packagist Maintenance level: Love stability-wip TYPO3 V10 TYPO3 V11 Minimum PHP Version GitHub CI status

Sentry integration for TYPO3

This TYPO3 extension allows you to automate reporting of errors to Sentry

Installation

The Sentry integration is installed as a composer package. For your existing project, simply include netlogix/nxsentry into the dependencies of your TYPO3 distribution:

$ composer require netlogix/nxsentry

Configuration

The new Sentry SDK 3.x has some environment variables which can be used, for example in a .env file:

SENTRY_DSN='http://public_key@your-sentry-server.com/project-id'
SENTRY_RELEASE='1.0.7'
SENTRY_ENVIRONMENT='Staging'

Add this to your LocalConfiguration.php

return [
    'LOG' => [
        'writerConfiguration' => [
            \TYPO3\CMS\Core\Log\LogLevel::ERROR => [
                'Netlogix\Nxsentry\Log\Writer\SentryBreadcrumbWriter' => [],
                'Netlogix\Nxsentry\Log\Writer\SentryWriter' => [],
            ],
        ],
    ],
];

Overwriting default options in the LocalConfiguration.php

return [
    'EXTENSIONS' => [
        'nxsentry' => [
            'options' => [
                'dsn' => 'http://public_key@your-sentry-server.com/project-id'
            ]
        ],
    ],
];

Add own integration to add custom data to the event.

return [
    'EXTENSIONS' => [
        'nxsentry' => [
            'integrations' => [
                new MyCustomIntegration()
            ]
        ],
    ],
];