All SDKs

FastAPI

v

sentry-sdk

Use the official Sentry SDK with the DSN shown in your AllStak project setup. No AllStak-specific SDK is required.

Install

These official Sentry commands come from the AllStak-managed SDK catalog.

uv
uv add sentry-sdk
pip
pip install sentry-sdk
poetry
poetry add sentry-sdk

Quick start

import sentry_sdk

sentry_sdk.init(
    dsn="{{DSN}}",
    environment="production",
    release="[email protected]",
    traces_sample_rate=1.0,
    # Off by default. Enable only if you accept sending usernames,
    # emails and IP addresses to your telemetry backend.
    send_default_pii=False,
)

sentry_sdk.capture_exception(Exception("hello from sentry-sdk"))