FastAPI sentry-sdk on Epure (store path verify)
FastAPI Sentry self-host
Keep FastAPIIntegration, point dsn at Epure, zero traces/profiles rates. Docs install is unpinned; Python fixtures use store. Confirm with Verify.
On this pageShowHide
Keep official sentry-sdk and FastAPIIntegration, point only dsn at Epure, and set traces_sample_rate and profiles_sample_rate to 0. Docs install is unpinned (pip install sentry-sdk); confirm with Verify. Python fixtures exercise store; envelope also works when the SDK sends it. Stacks stay raw.
You already run FastAPI (or Django / Flask / Celery beside it) on official Sentry SDKs and want exception Issues on a two-container self-host (Rust binary + PostgreSQL 16) without a Python symbol server. This how-to is FastAPI-first while citing the Python platform docs.
Unique wedge: keep FastAPIIntegration; only dsn changes; wire honesty that Python fixtures use POST /store/ while envelope also works. Version-pin honesty: unpinned as docs, no invented pin. Bias disclosed: Epure first-party docs.
Primary how-to: Python. Acceptance: Verify. Chooser: Quickstart. Host: Installation. Auth: Authentication. Sibling: Sentry SDK compatible, Epure vs Sentry.
Install (unpinned)
Install as docs: pip install sentry-sdk. Keep Django / Flask / FastAPI integrations from the official SDK. Only dsn changes. There is no SDK version string in fixtures/sentry/python/store.json; do not invent a pin. Confirm your installed version with Verify.
Init for FastAPI
Call sentry_sdk.init once at process start, before the framework serves traffic. Set sample rates for traces and profiles to 0.0.
dsn
- Value
- Required: public key + Epure host + project UUID
environment
- Value
- Tag for the dashboard filter strip
release
- Value
- Version string on the issue
traces_sample_rate
- Value
- 0.0; transactions discarded
profiles_sample_rate
- Value
- 0.0; profiles discarded
| Dimension | Value |
|---|---|
| dsn | Required: public key + Epure host + project UUID |
| environment | Tag for the dashboard filter strip |
| release | Version string on the issue |
| traces_sample_rate | 0.0; transactions discarded |
| profiles_sample_rate | 0.0; 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; init the SDK in the worker process too.
Store vs envelope
Python fixtures use the legacy store path (POST /store/) and are E2E tested. Envelope also works when the SDK sends it. Both authenticate with the project DSN. See Authentication for header vs query shapes.
Capture errors
Handled path: sentry_sdk.capture_exception(exc) inside except, then re-raise if needed. After ingest you should see 202, then an issue whose title matches the exception type and value, with a stack as sentry-sdk sent it.
Never-send table
401 / 403
- What to do
- Recopy DSN from Settings → SDK connection
202, empty Issues
- What to do
- Match environment chip to environment
Worker throws missing
- What to do
- Init SDK in the worker process, not only the web app
| Dimension | What to do |
|---|---|
| 401 / 403 | Recopy DSN from Settings → SDK connection |
| 202, empty Issues | Match environment chip to environment |
| Worker throws missing | Init SDK in the worker process, not only the web app |
Verify path
Throw or capture_exception, then open Issues on the project that owns the DSN. Match the env chip. Optional store curl from Verify / Other runtimes when no SDK is wired yet.
Who should use what
Use this guide for FastAPI (and sibling Python frameworks) on Epure. Stay on Sentry Cloud if profiling or APM is the daily debug loop. Epure does not demangle Python stacks.
Use this guide if
- You run FastAPI and want official sentry-sdk pointed at Epure.
- You need store-vs-envelope honesty for Python fixtures.
- You will keep FastAPIIntegration and only swap dsn.
Read something else if
- You need the multi-runtime scoreboard: Sentry SDK compatible.
- You need JS/TS demangle: Sourcemaps self-hosted verify.
- APM/profiling is required: stay on Sentry Cloud (Epure vs Sentry).
Limitations
Epure is not 100% Sentry compatible. No Python symbol server. Traces and profiles are not Epure features. Install is unpinned as docs. Stack is two Compose services: Rust binary + PostgreSQL 16. Cloud is not live.
- Epure is not 100% Sentry compatible.
- No Python demangle / symbol server.
- traces_sample_rate and profiles_sample_rate must stay 0.
- Do not invent a sentry-sdk version pin; docs are unpinned.
- Do not invent FastAPI middleware source or throughput claims.
- Cloud is not live.
Deep links: Python | Verify | Quickstart | Installation | Authentication.