netlogix/nxsentry

Sentry集成

安装次数: 4,864

依赖者: 0

建议者: 1

安全性: 0

星标: 0

关注者: 5

分支: 0

开放问题: 0

类型:typo3-cms-extension

1.1.3 2022-12-22 14:07 UTC

This package is auto-updated.

Last update: 2024-09-10 10:01:30 UTC


README

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

TYPO3的Sentry集成

TYPO3扩展允许您自动将错误报告给Sentry

安装

Sentry集成作为composer包安装。对于您的现有项目,只需将netlogix/nxsentry包含到您的TYPO3发行版的依赖项中即可

$ composer require netlogix/nxsentry

配置

新的Sentry SDK 3.x有一些环境变量可以用于配置,例如在.env文件中

SENTRY_DSN='http://[email protected]/project-id'
SENTRY_RELEASE='1.0.7'
SENTRY_ENVIRONMENT='Staging'

将以下内容添加到您的LocalConfiguration.php

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

LocalConfiguration.php中覆盖默认选项

return [
    'EXTENSIONS' => [
        'nxsentry' => [
            'options' => [
                'dsn' => 'http://[email protected]/project-id'
            ]
        ],
    ],
];

添加自己的集成以向事件添加自定义数据

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