fly304625 / sentry-php
基于Sentry (http://getsentry.com) 的PHP客户端的分支,同时支持php5.2/php5.6
1.6.2
2017-02-03 07:32 UTC
Requires
- php: >=5.2.4
- ext-curl: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^1.8.0
- monolog/monolog: *
- phpunit/phpunit: ^4.8 || ^5.0
Suggests
- monolog/monolog: Automatically capture Monolog events as breadcrumbs
Conflicts
- raven/raven: *
- dev-master
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.1
- 1.0.0
- 0.22.0
- 0.21.2
- 0.21.1
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.1
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.1
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.1
- 0.9.0
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.0
- 0.5.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1
- dev-feat/remove-tests-for-php7
- dev-fixup/travis-ci-php-5.3-precise
- dev-enhancement/more-info-about-thrown-exception
- dev-enhancement/error-severity
- dev-enhancement/merge-with-upstream-ce93ddc
- dev-feature/2.0
- dev-releases/1.6.x
- dev-releases/1.5.x
- dev-releases/1.4.x
- dev-feature/overhaul-stacktraces
- dev-releases/1.3.x
- dev-release/1.2.x
- dev-releases/1.1.x
- dev-releases/1.x
- dev-releases/0.22.x
- dev-releases/0.21.x
- dev-releases/0.20.x
- dev-force-strings
- dev-no-session
- dev-breadcrumbs
- dev-sentry-laravel
This package is auto-updated.
Last update: 2024-09-24 19:50:54 UTC
README
本项目是Sentry(https://getsentry.com)的官方PHP SDK v1.7的分支,旨在使其即使在php5.2、php5.6下也能正常工作。本项目已修复了https://github.com/getsentry/sentry-php/pull/615/commits/21e39a6bc4e27591dabe4118d9b996bbc109b3a0的问题。
功能
- 自动报告(未)处理的异常和错误
- 发送自定义的诊断数据
- 在网络发送之前处理和净化数据
安装
有几种方法可以安装Sentry的PHP集成。
$ git clone https://github.com/fly304625/sentry-php.git
or
$ composer require fly304625/sentry-php
或者您可以手动安装它
- 将最新版本的sentry-php存档下载并解压缩到您的PHP项目中。
- 在您的应用程序中要求自动加载器
require_once '/path/to/Raven/library/Raven/Autoloader.php'; Raven_Autoloader::register();
使用方法
// Instantiate a new client with a compatible DSN and install built-in // handlers $sentryClient = new Raven_Client('https://e9ebbd88548a441288393c457ec90441:399aaee02d454e2ca91351f29bdc3a07@app.getsentry.com/3235'); $sentryClient->install(); // Capture an exception $event_id = $sentryClient->captureException($ex); // Give the user feedback echo "Sorry, there was an error!"; echo "Your reference ID is " . $event_id;
有关更多信息,请参阅文档。
框架集成
有其他包可以将此SDK集成到最常见的框架中。