error-tracker/php-sdk
Composer 安装命令:
composer require error-tracker/php-sdk
包简介
PHP libary for interacting with the error tracker api
README 文档
README
The core Error Tracker SDK for PHP. This library is for interacting with the Error Tracker API with PHP. You can also use this package for registering an error handler for a vanilla PHP app.
Who is this for?
- Developers who need a universal view of errors and bugs - before their client or users complain.
- Developers who need raw access to the API so you can report your own errors.
- Those using a native PHP application and need to register an error handler.
- Developers creating a third party plug-in for an unsupported PHP framework.
- QA / Testers who need an overall knowledge of errors across multiple systems
Installation
You can install this package with composer.
composer require erorr-traker/php-sdk
The API Client
The API client class can be used to access to the Error Tracker API
Initialization
use ErrorTracker\Client; $client = new Client('APP_KEY');
Reporting an error
$client->report([ 'name' => 'The error name', 'text' => 'A message about the error' ]);
The Error Handler
If you are using a vanilla PHP application you can register an error handler to
catch your errors and sent them straight to Error Tracker. Simply create a new
instance of the Handler class.
use ErrorTracker\Handler; new Handler('MY_APP_KEY');
Disable and enable sending errors with the enabled property of the
Handler class
$handler = new Handler('MY_APP_KEY'); // Turn off $handler->enabled = false; // Turn back on $handler->enabled = true;
Unregister the handlers by using the unregister function
$handler->unregister();
Contributing
Getting set up
Clone the repo and run composer install.
Then start hacking!
Testing
All new features of bug fixes must be tested. Testing is with phpunit and can be run with the following command
composer run-script test
Coding Standards
This library uses psr2 coding standards and squizlabs/php_codesniffer for
linting. There is a composer script for this:
composer run-script lint
Pull Requests
Before you create a pull request with you changes, the pre-commit script must pass. That can be run as follows:
composer run-script pre-commit
Credits
This package is created and maintained by Practically.io
error-tracker/php-sdk 适用场景与选型建议
error-tracker/php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15.57k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 08 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 error-tracker/php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 error-tracker/php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 15.57k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-08-09