baraja-core / tracy-sentry-bridge
此包最新版本(v1.0.1)没有可用的许可证信息。
该包为Tracy和Sentry之间提供了一种简单的连接方式。
v1.0.1
2022-04-10 17:42 UTC
Requires
- php: ^8.0
- sentry/sdk: ^3.1
- tracy/tracy: ^2.8 || 3.0-dev
Requires (Dev)
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.0
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-nette: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- roave/security-advisories: dev-master
- spaze/phpstan-disallowed-calls: ^2.0
This package is auto-updated.
Last update: 2024-09-08 17:56:36 UTC
README
该包为Tracy和Sentry之间提供了一种简单的连接方式。
📦 安装
最好使用Composer进行安装,您也可以在Packagist和GitHub上找到该包。
要安装,只需使用以下命令
$ composer require baraja-core/tracy-sentry-bridge
您可以通过创建内部类的实例手动使用该包,或者注册DIC扩展以将服务直接链接到Nette框架。
如何使用
在您的项目Bootstrap中
public static function boot(): Configurator { $configurator = new Configurator; if (\function_exists('\Sentry\init')) { \Sentry\init( [ 'dsn' => 'https://....', 'attach_stacktrace' => true, ] ); } // register here: SentryLogger::register(); }
该工具自动加载原始Tracy Logger并注册向Sentry的日志记录。日志记录同时发生在Sentry和原始日志中,不会中断数据的完整性。
如果日志写入Sentry失败,异常将被写入原始Logger。
📄 许可证
baraja-core/tracy-sentry-bridge
在MIT许可证下授权。有关更多详细信息,请参阅LICENSE文件。