Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
11 changes: 2 additions & 9 deletions docs/platforms/python/integrations/fastapi/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Install `sentry-sdk` from PyPI:
```bash {tabTitle:pip}
pip install sentry-sdk
```

```bash {tabTitle:uv}
uv add sentry-sdk
```
Expand Down Expand Up @@ -52,8 +53,6 @@ The following information about your FastAPI project will be available to you on
- Sentry excludes raw bodies and multipart file uploads.
- Sentry also excludes personally identifiable information (such as user ids, usernames, cookies, authorization headers, IP addresses) unless you set `send_default_pii` to `True`.

![Issues List](./img/fastapi-issues-list.png)

### Monitor Performance

The following parts of your FastAPI project are monitored:
Expand All @@ -63,8 +62,6 @@ The following parts of your FastAPI project are monitored:
- Database queries
- Redis commands

![Performance details are shown as waterfall diagram](./img/fastapi-performance-details.png)

<Alert>

The parameter [traces_sample_rate](/platforms/python/configuration/options/#traces-sample-rate) needs to be set when initializing the Sentry SDK for performance measurements to be recorded.
Expand Down Expand Up @@ -128,7 +125,6 @@ You can pass the following keyword arguments to `StarletteIntegration()` and `Fa
```

In the above code, the transaction name will be:

- `"/catalog/product/{product_id}"` if you set `transaction_style="url"`
- `"product_detail"` if you set `transaction_style="endpoint"`

Expand All @@ -142,7 +138,6 @@ You can pass the following keyword arguments to `StarletteIntegration()` and `Fa
reported to Sentry. Unhandled exceptions that don't have a `status_code` attribute will always be reported to Sentry.

Examples of valid `failed_request_status_codes`:

- `{500}` will only send events on HTTP 500.
- `{400, *range(500, 600)}` will send events on HTTP 400 as well as the 5xx range.
- `{500, 503}` will send events on HTTP 500 and 503.
Expand All @@ -164,9 +159,7 @@ You can pass the following keyword arguments to `StarletteIntegration()` and `Fa

(Note that `OPTIONS` and `HEAD` are missing by default.)

<Alert title="Added in 2.15.0">
The `http_methods_to_capture` option.
</Alert>
<Alert title="Added in 2.15.0">The `http_methods_to_capture` option.</Alert>

## Supported Versions

Expand Down
Loading