Epure
PlatformsPython

Python

Use official sentry-sdk. Point dsn at your Epure host. No Epure Python package.

Use this guide when the process is Python: Django, Flask, FastAPI, Starlette, Celery, scripts. Do not use this for JS/TS (→ Browser, Node, Next.js). Full map: Pick your SDK.

Capture exceptions in Python

Install sentry-sdk, call sentry_sdk.init once at startup, then throw or capture_exception. Python fixtures exercise store (POST /store/) and are E2E tested; envelope also works when the SDK sends it.

Grouping uses raw frames (file, function, line as sent). No Python symbol server.

How do I install sentry-sdk?

pip install sentry-sdk

Keep Django / Flask / FastAPI integrations from the official SDK. Only dsn changes.

Init the Python SDK

Call once at process start, before the framework serves traffic.

import sentry_sdk

sentry_sdk.init(
    dsn="http://YOUR_PUBLIC_KEY@localhost:8080/YOUR_PROJECT_ID",
    environment="local",
    release="my-api@0.0.0",
    traces_sample_rate=0.0,
    profiles_sample_rate=0.0,
)
OptionValue
dsnRequired: public key + Epure host + project UUID
environmentTag for the dashboard filter strip
releaseVersion string on the issue
traces_sample_rate0; transactions discarded
profiles_sample_rate0; profiles discarded

Framework integrations (DjangoIntegration, FastAPI, Celery) stay. Point them at the same DSN. Celery workers can share the web project or use a second one.

How do I capture handled errors?

try:
    1 / 0
except Exception as exc:
    sentry_sdk.capture_exception(exc)
    raise

What should I see after ingest?

202, then an issue whose title matches the exception type and value, with a stack as sentry-sdk sent it.

Why does Python never send?

What you seeWhat to do
401 / 403Recopy the DSN from Settings → SDK connection
202, empty IssuesMatch the environment chip to environment
Worker throws missingInit the SDK in the worker process, not only the web app

No SDK yet? Other runtimes has a store curl, or use Try ingest.

Next

Does Epure demangle Python stacks?

No. Symbolication is JS/TS sourcemaps only. Python issues group on file, function, and line as sentry-sdk sends them. That is enough for most Django and FastAPI frames. Confirm with Verify.

Which wire path does Python use?

Python fixtures use the legacy store path (POST /store/) and are E2E tested. Envelope also works when the SDK sends it. Auth: Authentication.

Are traces stored?

No. Set traces_sample_rate and profiles_sample_rate to 0. Transaction and profile items are discarded on ingest. Exception events plus breadcrumbs stay.

Continue the migration

Check the Sentry SDK compatibility matrix and follow migrate from Sentry before production cutover.