You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the logging method is called from an exception handler (an except block) with the exc_info=True parameter, then it will report information about the currently handled exception. (A specific exception instance can also be passed as the value for exc_info)
We could implement a logging handler which, if an exception is present, reports it to AppSignal (doing the equivalent of send_error() for it)
Would this be useful? Perhaps this would also report exceptions that are not relevant to the user. Users might prefer to have finer control over it by calling appsignal.send_error() manually.
We could patch the logging module (OpenTelemetry contrib does it, to implement some other functionality) to add this to all loggers, or we could provide a handler that allows users to add it to their logger.
The text was updated successfully, but these errors were encountered:
Related issue: appsignal/appsignal-ruby#1095
We discussed this in connection to that releated issue. If we implement this on our existing data model we would only report the error as a log message and not as a error for our error reporting feature.
Investigate whether we should and can do this.
Python logger context
Python's built-in
logging
package allows for log messages to include exception information.If the logging method is called from an exception handler (an
except
block) with theexc_info=True
parameter, then it will report information about the currently handled exception. (A specific exception instance can also be passed as the value forexc_info
)There is also a
logger.exception()
method, which already setsexc_info=True
, and which is meant to be used from within exception handlers.Possible implementations
We could implement a logging handler which, if an exception is present, reports it to AppSignal (doing the equivalent of
send_error()
for it)Would this be useful? Perhaps this would also report exceptions that are not relevant to the user. Users might prefer to have finer control over it by calling
appsignal.send_error()
manually.We could patch the logging module (OpenTelemetry contrib does it, to implement some other functionality) to add this to all loggers, or we could provide a handler that allows users to add it to their logger.
The text was updated successfully, but these errors were encountered: