Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules silently hide panics #540

Open
slayer opened this issue May 29, 2019 · 4 comments
Open

modules silently hide panics #540

slayer opened this issue May 29, 2019 · 4 comments

Comments

@slayer
Copy link

slayer commented May 29, 2019

echo Middleware silently hides panic - it silently recovers it.

I'll be better to optionally recovers panics or set external handler or panics it again.
Because we need panics in logs and handle it in our way

@axw
Copy link
Member

axw commented May 30, 2019

@slayer thanks for opening the issue. I think we should introduce an apmecho.Option similar to apmhttp.WithRecovery, and allow users to specify "nil" meaning that no recovery is performed.

I'm not sure when I'll get to this. If you would like to take on the work of implementing it, please go for it. It would be good to start with an outline of the API before going too far.

@axw
Copy link
Member

axw commented May 30, 2019

By the way, in case it's not clear: the panics will be reported to the APM Server, and will show up in the APM UI under the "errors" tab. I do agree that there should be an option to continue propagating the panic, or to skip this panic-tracking behaviour altogether though.

@slayer
Copy link
Author

slayer commented May 30, 2019

I believe I can try implement it on next week

Yes, it shows in UI, but I spend an hour to detect why I have 500 but no errors in console logs

@axw
Copy link
Member

axw commented May 30, 2019

Yes, it shows in UI, but I spend an hour to detect why I have 500 but no errors in console logs

Fair point!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants