nofutur3/nette-sentry

Sentry (http://getsentry.com) 的 Nette 集成

v0.9.0 2016-12-22 20:35 UTC

This package is auto-updated.

Last update: 2024-09-10 04:50:10 UTC


README

Build Status Downloads this Month Latest stable

Sentry 的 Nette 集成

安装

推荐使用 composer 进行安装。

如果您还没有使用 composer,您应该试试它。毕竟,现在是 2016 年(+)。

composer require nofutur3/nette-sentry

替代方法 - 如果您无法使用 composer。将源代码(例如克隆 git 仓库)下载到您的项目中,并以某种方式要求它。对于 nette 框架,在您的引导文件中可以这样操作

$configurator
    ->createRobotLoader()
    ->addDirectory(__DIR__ . 'path/to/library/');

使用方法

在 Nette(2.3+)中
extensions:
    sentry: Nofutur3\Sentry\DI\SentryExtension
    
sentry:
    dsn: (your dsn from sentry)

使用默认值的扩展配置

sentry:
    dsn: (your dsn from sentry)
    debug: false
    user:
        email: email # email property in IIdentity
        username: username # username property in IIDentity
    skip_capture:
        - 'Nette\Neon\Exception' # will not report these exceptions
    options: # check: https://docs.sentry.io/clients/php/config/