ErrorDX

Python

Capture backend errors in Python services.

Install the Python SDK:

pip install sentry-sdk
import sentry_sdk

sentry_sdk.init(
    dsn="http://<publicKey>@localhost:3000/<projectId>",
    traces_sample_rate=1.0,
)

Send a test event:

try:
    raise Exception("TryOpenTrace python test")
except Exception as e:
    sentry_sdk.capture_exception(e)