stacks-blockchain-api icon indicating copy to clipboard operation
stacks-blockchain-api copied to clipboard

Remove non-critical `error` log entries, alert on `error` logs

Open zone117x opened this issue 4 years ago • 2 comments

The codebase generally has pretty good error capturing and logging for unexpected conditions. Typically any external bug report will have associated logs with level: error hours or days before the bug has been reported.

We should try to get to a point where we can alert on error level logs. At the moment there's several non-critical error log entries that spam the log output so we can't alert on them yet. This log spam also makes it hard to review errors being logged to debug issues or notice anything critical.

I'm creating issues for instances of these unnecessary level: error log conditions as I find them, using this issue as the tracker.

Errors to remove before we can enable alerting:

  • [x] https://github.com/hirosystems/stacks-blockchain-api/issues/851
  • [x] https://github.com/hirosystems/stacks-blockchain-api/issues/854
  • [x] https://github.com/hirosystems/stacks-blockchain-api/issues/1009
  • [ ] https://github.com/hirosystems/stacks-blockchain-api/issues/1064
  • [ ] https://github.com/hirosystems/stacks-blockchain-api/issues/1065

zone117x avatar Nov 16 '21 15:11 zone117x

@zone117x a little clarification is required. Let me know if I have a correct understanding. We are supposed to send the error msg with 400 status in response to the client instead of printing them on the console. If I'm right with that, so does using try-catch block look like a good approach to you?

MHassanTariq avatar Nov 29 '21 11:11 MHassanTariq

Once next API version is released, we need to take another look at the remaining level: error log spam to see if we can start alerting, or if we have more areas in the API where logging needs adjusted.

zone117x avatar Feb 01 '22 12:02 zone117x