nbeyond/raygun-exception-listener
Composer 安装命令:
composer require nbeyond/raygun-exception-listener
包简介
This packages uses the Raygun4PHP package. It makes it easier to filter the data that is being send to raygun, making your application GDPR compliant
README 文档
README
This package lets you add filters to the Raygun package (which this package is dependent on). By using this package you filter the data that is being send to Raygun in order to comply to the GDPR Law. You can also add/overwrite the filters to better suit your application.
##Installation Raygun Data Filter is dependent on Raygun4PHP, in order to use Raygun Data Filter make sure the Raygun4PHP package is working correctly
With Composer
Composer is a package management tool for PHP which automatically fetches dependencies and also supports autoloading - this is a low-impact way to get Raygun4PHP into your site.
1. If you use a *nix environment, follow the instructions to install Composer. Windows users can run this installer to automatically add it to the Path.
2. Within the project's root directory run the following console command:
php composer.phar require tripledotzero/raygun-exception-listener
3. From your shell run php composer.phar install (*nix) or composer install (Windows). This will download Raygun4PHP and create the appropriate autoload data.
##Usage You can automatically send both PHP errors and object-oriented exceptions to Raygun. The RaygunClient requires an HTTP transport (e.g. Guzzle or other PSR-7 compatible interface).
Currently, there are 2 Guzzle-based transport classes. asynchronous and synchronous. You can choose to use either the GuzzleSync or GuzzleAsync by setting setUseAsync to true.
###example code
<?php namespace App\EventListener; use RaygunFilterParams\Config; use RaygunFilterParams\DataFilter; use Symfony\Component\HttpKernel\Event\ExceptionEvent; class ExceptionListener { public function onKernelException(ExceptionEvent $event) { $config = new Config($_ENV['RAYGUN_BASE_URI'], $_ENV['RAYGUN_API_KEY']); $config->setUserTracking(true); $dataFilter = new DataFilter($config); $dataFilter->sendToRaygun($event->getThrowable()); } }
as you can see in order to send the data to Raygun, you would first need to create the config object with the BASE_URI and API_KEY.
The DisableUserTracking is turn off by default, in order to turn it on use
$config->setUserTracking(true);
it is the same for the proxy
$config->setProxy('proxy:8080');
For more information see the Raygun4PHP documentation or the Raygun website
nbeyond/raygun-exception-listener 适用场景与选型建议
nbeyond/raygun-exception-listener 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.4k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 01 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「raygun」 「data filter」 「gdpr」 「raygun data filter」 「raygun filter」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nbeyond/raygun-exception-listener 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nbeyond/raygun-exception-listener 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nbeyond/raygun-exception-listener 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Raygun.com client for sending errors and exceptions automatically.
Utopia Logger library is simple and lite library for logging information, such as errors or warnings. This library is aiming to be as simple and easy to learn and use.
Shoot aims to make providing data to your templates more manageable
Raygun integration for SilverStripe
Nova searchable filter for belongsTo relationships.
Adds the EDTF data type to Wikibase
统计信息
- 总下载量: 10.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-01-17