Skip to content

Commit

Permalink
ref(python): Add a warning about uWSGI to all WSGI frameworks (#9166)
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana committed Feb 21, 2024
1 parent fbcc369 commit 9ce1669
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/bottle/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr

## Behavior

<Include name="python-uwsgi-warning.mdx" />

- The Sentry Python SDK will install the Bottle integration for all of your apps. The integration hooks into base Bottle class.

- All exceptions leading to an Internal Server Error are reported.
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/django/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ urlpatterns = [

## Behavior

<Include name="python-uwsgi-warning.mdx" />

### Issue Reporting

- If you use `django.contrib.auth` and you've set `send_default_pii=True` in your call to `init`, user data (such as current user id, email address, username) will be attached to error events.
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/falcon/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr

## Behavior

<Include name="python-uwsgi-warning.mdx" />

- The Sentry Python SDK will install the Falcon integration for all of your apps. The integration hooks into the base `falcon.API` class via monkey patching.

- All exceptions leading to an Internal Server Error are reported.
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/flask/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr

## Behavior

<Include name="python-uwsgi-warning.mdx" />

After initialization:

- If you use `flask-login` and set `send_default_pii=True` in your call to `init`, user data (current user id, email address, username) will be attached to the event.
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/pyramid/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ When you point your browser to [http://localhost:6543/](http://localhost:6543/)

## Behavior

<Include name="python-uwsgi-warning.mdx" />

- The Sentry Python SDK will install the Pyramid integration for all of your apps. The integration hooks into Pyramid itself, not any of your apps specifically.

- The SDK will report all exceptions leading to an Internal Server Error. These two kinds of exceptions are:
Expand Down
2 changes: 2 additions & 0 deletions docs/platforms/python/integrations/wsgi/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ make_server('', 8000, app).serve_forever()

## Behavior

<Include name="python-uwsgi-warning.mdx" />

- Request data is attached to all events: **HTTP method, URL, headers**. 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`.

Each request has a separate scope. Changes to the scope within a view, for example setting a tag, will only apply to events sent as part of the request being handled.
Expand Down
7 changes: 7 additions & 0 deletions includes/python-uwsgi-warning.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Alert level="warning" title="uWSGI and Sentry SDK">

If you're using uWSGI, note that it doesn't support threads by default. This might lead to unexpected behavior when using the Sentry SDK, from features not working properly to uWSGI workers crashing.

To enable threading support in uWSGI, make sure you have both `--enable-threads` and `--py-call-uwsgi-fork-hooks` on.

</Alert>

0 comments on commit 9ce1669

Please sign in to comment.