pbergman/sentry-bundle
最新稳定版本:2.0.4
Composer 安装命令:
composer require pbergman/sentry-bundle
包简介
Monolog sentry handler with support for breadcrumbs and sentry dispatching events
README 文档
README
I have created this bundle because the entry/sentry-symfony was not using the batch handler from monolog when connected with a buffer handler. This resulted in all messaged from a request being delivered individually instead of using breadcrumbs.
So with this extension you could configure monolog like this:
handlers:
main:
type: fingers_crossed
action_level: error
handler: grouped
excluded_http_codes: [404, 405]
grouped:
type: whatfailuregroup
members: [ streamed, sentry_deduplicated ]
streamed:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
sentry_deduplicated:
type: deduplication
handler: sentry
sentry:
type: service
id: pbergman.sentry_handler
And when the fingercrossed handler get an error message, all messages in the buffer of INFO or higher will be grouped and send to sentry.
This bundle has also created a bridge between the native hooks (before_breadcrumb an before_send) and symfony dispatcher. So now you can just create listener that listens to PBergman\Bundle\SentryBundle\Events::EVENT_BEFORE_SEND or PBergman\Bundle\SentryBundle\Events::EVENT_BEFORE_BREADCRUMB
By default it will create a listener that will filter exception classes (see bin/console config:dump-reference p_bergman_sentry) to disable add the following config:
p_bergman_sentry:
excluded_exceptions: ~
Or set there the desired classes.
统计信息
- 总下载量: 1.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-12-15