A
A
ADKX2022-01-14 12:41:27
go
ADKX, 2022-01-14 12:41:27

How are panic crashes usually logged?

Prompt good practices on how to pledge raw panic.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Mamonov, 2022-01-14
@EvgenyMamonov

If we talk about the http server - I adopted the practice from Django.
I have an http middleware that:
- calls recover
- responds normally to the request, but does not crash, i.e. 500 + what we already know about the error and are working on fixing it
- collects all information on request, http headers, cookies, server settings, environment variables, etc. and notifies me by mail / telegram
This gives me the opportunity to find out about the problem before someone writes to support.
People, in a good way, are surprised when something doesn't work out for them, the server answers 500, they don't understand what to do. And I already found out about it, corrected the mistake and wrote them a letter saying that there was a mistake, but everything has already been fixed :)

D
Dmitry, 2022-01-14
@Spargwy

panic - abnormal termination of the program. It contains all the necessary information. We just leave the trace in its original form (you can't handle some panics) and the server is rebooted using reflex.
Clarifying questions in the comments. it is not entirely clear what is meant.

R
Roman Kitaev, 2022-01-14
@deliro

Sentry
61e1af6871d43200258930.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question