ibrows/php-airbrake-bundle
Composer 安装命令:
composer require ibrows/php-airbrake-bundle
包简介
This helps binds the php-airbrake module into a Symfony2 bundle for easy use with the framework.
关键字:
README 文档
README
This helps binds the php-airbrake module into a Symfony2 bundle for easy use with the framework. It will autoload an exception handler into the framework, so that all uncaught errors are sent to the Airbrake Service.
Installation Instructions
Using deps (for Symfony 2.0)
Add these blocks to the following files
deps
[PhpAirbrakeBundle]
git=http://github.com/nodrew/PhpAirbrakeBundle.git
target=/bundles/Nodrew/Bundle/PhpAirbrakeBundle
[php-airbrake]
git=http://github.com/nodrew/php-airbrake.git
target=/bundles/Nodrew/Bundle/PhpAirbrakeBundle/vendor/php-airbrake
app/autoload.php
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
...
'Nodrew' => __DIR__.'/../vendor/bundles',
...
));
Using composer (for Symfony 2.1)
The best way to install the library is by using Composer. Add the following to composer.json in the root of your project:
{ "require": { "nodrew/php-airbrake-bundle": "dev-master" } }
Including bundle in Kernel
app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// System Bundles
...
new Nodrew\Bundle\PhpAirbrakeBundle\PhpAirbrakeBundle(),
...
);
}
Configuration
app/config/config.yml
php_airbrake:
api_key: %airbrake_api_key%
api_endpoint: [optional custom API endpoint eg. http://api.airbrake.io/notifier_api/v2/notices]
queue: [optional resqueue queue name]
email_to: test@test.ch
disabled: false # %kernel.debug% maybe
app/config/parameters.ini
airbrake_api_key="[airpbrake api key]"
Calling Airbrake Manually
The Airbrake Client can be found inside the Service Container and can be used like this:
<?php $client = $container->get('php_airbrake.client'); $client->notifyAboutError('Something really bad happened!'); $client->notifyAboutException(new Exception('Why did I catch this? It would have been caught on its own!?!'));
Resque Integration
This client will allow for integration with PHPResque by providing the name of the Resque queue to add your error into. It is advisable that if you want to use PHPResque with Symfony2, that you use the PHPResqueuBundle from hlegius, as it makes interfacing the worker processes with Symfony2 a breeze.
Once this is installed and running, simply fill in the queue config variable with the name of the queue you would like to use. I suggest just keeping it simple with something like 'airbrake'. Assuming you have a worker process running for this queue, you should be golden.
License
This bundle is under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE
About
See also the list of contributors.
Reporting an issue or a feature request
Issues and feature requests are tracked in the Github issue tracker.
When reporting a bug, it may be a good idea to reproduce it in a basic project built using the Symfony Standard Edition to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.
ibrows/php-airbrake-bundle 适用场景与选型建议
ibrows/php-airbrake-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.75k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2013 年 07 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「logging」 「exceptions」 「airbrake」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ibrows/php-airbrake-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ibrows/php-airbrake-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ibrows/php-airbrake-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
php7ify is a project that brings new php7 classes and exceptions to php 5.x.
Airbrake.io integration for Symfony
Laravel package for the Airbrake API, which supports Errbit
The CodenamePHP Platform core that contains basic interfaces, exceptions etc..
errbit/airbrake integration with php with psr-2
Airbrake (phpbrake) integration for Zend Framework 3 (ZF3)
统计信息
- 总下载量: 11.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-07-05