Feature: Web Panic Reporting via hooks
This PR is for issue of "email after registry webapp panic" #41, improving my previous design (closed). It use self setting up hooks, to catch panic in web application. And, send email in hooks handle directly, to no use new http server and handler. Signed-off-by: xiekeyang <keyangxie@126.com>
This commit is contained in:
parent
1f015478a0
commit
47aa47e3f6
7 changed files with 223 additions and 2 deletions
|
@ -4,6 +4,20 @@ log:
|
|||
fields:
|
||||
service: registry
|
||||
environment: development
|
||||
hooks:
|
||||
- type: mail
|
||||
disabled: true
|
||||
levels:
|
||||
- panic
|
||||
options:
|
||||
smtp:
|
||||
addr: mail.example.com:25
|
||||
username: mailuser
|
||||
password: password
|
||||
insecure: true
|
||||
from: sender@example.com
|
||||
to:
|
||||
- errors@example.com
|
||||
storage:
|
||||
cache:
|
||||
blobdescriptor: redis
|
||||
|
@ -41,5 +55,5 @@ notifications:
|
|||
timeout: 1s
|
||||
threshold: 10
|
||||
backoff: 1s
|
||||
disabled: true
|
||||
|
||||
disabled: true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue