netlogix / nxsentry
Sentry集成
1.1.3
2022-12-22 14:07 UTC
Requires
- sentry/sentry: ^3.5
- typo3/cms-core: ^10.4 || ^11.5
Requires (Dev)
- ext-sqlite3: *
- nimut/phpunit-merger: ^1.1
- nimut/testing-framework: ^6.0
- phpunit/phpcov: ^8.2
Provides
README
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() ] ], ], ];