Symfony通过sentry-symfony包作为本机包支持。
安装sentry / sentry-symfony包:
$ composer require sentry/sentry-symfony
在app / AppKernel.php中启用捆绑包:
<?php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Sentry\SentryBundle\SentryBundle(),
);
// ...
}
// ...
}
将您的DSN添加到app / config / config.yml:
sentry:
dsn: "https://<key>@sentry.io/<project>"