-
-
Notifications
You must be signed in to change notification settings - Fork 11
Simplify error reporting #2
Copy link
Copy link
Closed
Description
Take Sentry SDK as a good example of such.
Capture errors
https://docs.sentry.io/platforms/python/#capturing-errors
from sentry_sdk import capture_exception
try:
a_potentially_failing_function()
except Exception as e:
# Alternatively the argument can be omitted
capture_exception(e)Capture messages
https://docs.sentry.io/error-reporting/capturing/?platform=python#capturing-messages
from sentry_sdk import capture_message
capture_message('Something went wrong')Extra context
https://docs.sentry.io/platforms/python/#extra-context
from sentry_sdk import configure_scope
with configure_scope() as scope:
scope.set_extra("character_name", "Mighty Fighter")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels