guanguans / laravel-exception-notify

Monitor exception and report it to notification channels(Dump、Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、Zulip).
MIT License
124 stars 11 forks source link

[Question] 在V3的版本中,没法控制当前异常是否发送报告 #48

Closed shuqingzai closed 1 year ago

shuqingzai commented 1 year ago

Is your feature request related to a problem? Please describe.

V3 版本似乎会把所有异常上报,当然是可以从 config 中配置,但是用户有时候需要的是同一个异常(可能是一个业务通用异常,但是按不同的 code 或 message 区分)进行不同的逻辑处理,甚至不需要上报这个异常,比如:Symfony\Component\HttpKernel\Exception\HttpException::class http 响应异常,在 httpStatusCode >= 500 我才需要上传,一些 500 以下,比如参数验证错误,客户端请求参数错误,这些我无需上报,这在目前是没法实现

Describe the solution you'd like

希望 V3 可以把异常上报的主动权交还给用户,就像以前 V2 版,我自己在 app/Exceptions/Handler.php 中决定,不是由扩展包对我的业务做决定

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

create-issue-branch[bot] commented 1 year ago

Branch issue-48-_Question_在V3的版本中,没法控制当前异常是否发送报告 created!

shuqingzai commented 1 year ago

是否可以把 https://github.com/guanguans/laravel-exception-notify/blob/88cea87491238b4379672156645d38a2e864cd78/src/ExceptionNotifyServiceProvider.php#L146 这个特性做成配置项??? @guanguans

Issues-translate-bot commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is it possible to make the feature of https://github.com/guanguans/laravel-exception-notify/blob/88cea87491238b4379672156645d38a2e864cd78/src/ExceptionNotifyServiceProvider.php#L146 a configuration item? ? ?

guanguans commented 1 year ago

是否可以把 https://github.com/guanguans/laravel-exception-notify/blob/88cea87491238b4379672156645d38a2e864cd78/src/ExceptionNotifyServiceProvider.php#L146 这个特性做成配置项??? @guanguans

我看看改一下。

Issues-translate-bot commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is it possible to make the feature of https://github.com/guanguans/laravel-exception-notify/blob/88cea87491238b4379672156645d38a2e864cd78/src/ExceptionNotifyServiceProvider.php#L146 a configuration item? ? ? @guanguans

OK, let me check it out.