-
Notifications
You must be signed in to change notification settings - Fork 30
Failure logging is incorrect #460
Comments
@bbangert could you add an example of a bad log entry? It'd be useful in the future to check for regression or if we see something similar. |
Sure, this is a sample:
I replaced some ID's there of course. In this case log_format seems to have gotten a failure instance which can't be formatted of course. This definitely should've resulted in a Sentry call as well, but no Sentry call, I'm not sure its being called properly actually. Per https://docs.getsentry.com/hosted/clients/python/api/, it appears captureException takes a 'message' argument, and then the exc_info. We are not passing a message, and only passing the exc_info tuple, so that might explain the problem. We should have a method somewhere we can hit when in stage, that trigger an exception on purpose for Sentry reporting so we can verify it works. |
I should note, since the problematic fields here are not included in our custom JSON, my guess is that the formatEvent call on line 127 is failing, thus this error. It should be wrapped in a try/except and the message can be set to, 'unable to format event', and include a repr of the event instead. |
Declare the arguments for raven to hopefully prevent key corruption Closes #460
We are apparently not logging failures correctly. log.failure takes a message as the first arg, not a failure instance. The failure instance should be passed as failure=, per the docs: https://twistedmatrix.com/documents/16.1.1/api/twisted.logger.Logger.html#failure |
Declare the arguments for raven to hopefully prevent key corruption. NOTE: twisted logging appears to be fairly touchy about parameters. We fully specify the parameter names to prevent issues with arguments being used in unexpected ways and generating odd exceptions in handling. Because errors in error handling just mean higher bar bills. Closes #460
Declare the arguments for raven to hopefully prevent key corruption. NOTE: twisted logging appears to be fairly touchy about parameters. We fully specify the parameter names to prevent issues with arguments being used in unexpected ways and generating odd exceptions in handling. Because errors in error handling just mean higher bar bills. Closes #460
Declare the arguments for raven to hopefully prevent key corruption. NOTE: twisted logging appears to be fairly touchy about parameters. We fully specify the parameter names to prevent issues with arguments being used in unexpected ways and generating odd exceptions in handling. Because errors in error handling just mean higher bar bills. Closes #460
Declare the arguments for raven to hopefully prevent key corruption. NOTE: twisted logging appears to be fairly touchy about parameters. We fully specify the parameter names to prevent issues with arguments being used in unexpected ways and generating odd exceptions in handling. Because errors in error handling just mean higher bar bills. Closes #460
Logging errors is broken as instances are still sneaking in, better checks need to be done, and the format attempt itself should be in a try/except, with errors sentry reported.
The text was updated successfully, but these errors were encountered: