hirosystems / chainhook

Extract transactions from Stacks and Bitcoin and build event driven re-org resistant indexers and databases.
GNU General Public License v3.0
155 stars 63 forks source link

Classify & format panic logs correctly #521

Closed CharlieC3 closed 7 months ago

CharlieC3 commented 8 months ago

It seems panic logs are not being printed in correct JSON syntax, which may cause issues when our log collectors try to parse them. Additionally, panic logs may not be getting classified correctly as fatal level (a rank above error level). See here for various supported log levels we can use.

{thread 'Chainhook event observer' panicked at 'Unable to register new chainhook spec: Network unknown', "components/chainhook-sdk/src/observer/mod.rs:msg1337"::25"

Ideally all panics would be printed in valid JSON, and be classified as fatal (or something similar to the critical log level referenced in the link above).

Referenced panic, but a fix may be needed for all panics.

aravindgee commented 8 months ago

[Fixing this issue will also unblock chainhook alerting for thread panic.]

github-actions[bot] commented 7 months ago

:tada: This issue has been resolved in version 1.4.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: