From 9ce16690d6858de6f12bdad88c11a0120acf3202 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Wed, 21 Feb 2024 11:47:32 +0100 Subject: [PATCH] ref(python): Add a warning about uWSGI to all WSGI frameworks (#9166) --- docs/platforms/python/integrations/bottle/index.mdx | 2 ++ docs/platforms/python/integrations/django/index.mdx | 2 ++ docs/platforms/python/integrations/falcon/index.mdx | 2 ++ docs/platforms/python/integrations/flask/index.mdx | 2 ++ docs/platforms/python/integrations/pyramid/index.mdx | 2 ++ docs/platforms/python/integrations/wsgi/index.mdx | 2 ++ includes/python-uwsgi-warning.mdx | 7 +++++++ 7 files changed, 19 insertions(+) create mode 100644 includes/python-uwsgi-warning.mdx diff --git a/docs/platforms/python/integrations/bottle/index.mdx b/docs/platforms/python/integrations/bottle/index.mdx index 49d7dcc05f015..2653249995ea2 100644 --- a/docs/platforms/python/integrations/bottle/index.mdx +++ b/docs/platforms/python/integrations/bottle/index.mdx @@ -56,6 +56,8 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr ## Behavior + + - 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. diff --git a/docs/platforms/python/integrations/django/index.mdx b/docs/platforms/python/integrations/django/index.mdx index 4cb181c5cf30d..7e751204a6571 100644 --- a/docs/platforms/python/integrations/django/index.mdx +++ b/docs/platforms/python/integrations/django/index.mdx @@ -55,6 +55,8 @@ urlpatterns = [ ## Behavior + + ### 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. diff --git a/docs/platforms/python/integrations/falcon/index.mdx b/docs/platforms/python/integrations/falcon/index.mdx index 68e4ca8e74453..0d06fd71a7f83 100644 --- a/docs/platforms/python/integrations/falcon/index.mdx +++ b/docs/platforms/python/integrations/falcon/index.mdx @@ -58,6 +58,8 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr ## Behavior + + - 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. diff --git a/docs/platforms/python/integrations/flask/index.mdx b/docs/platforms/python/integrations/flask/index.mdx index 3e4583a87504c..a78bdfaf911f1 100644 --- a/docs/platforms/python/integrations/flask/index.mdx +++ b/docs/platforms/python/integrations/flask/index.mdx @@ -58,6 +58,8 @@ It takes a couple of moments for the data to appear in [sentry.io](https://sentr ## Behavior + + 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. diff --git a/docs/platforms/python/integrations/pyramid/index.mdx b/docs/platforms/python/integrations/pyramid/index.mdx index 08126608f3643..61c600158b4c5 100644 --- a/docs/platforms/python/integrations/pyramid/index.mdx +++ b/docs/platforms/python/integrations/pyramid/index.mdx @@ -60,6 +60,8 @@ When you point your browser to [http://localhost:6543/](http://localhost:6543/) ## Behavior + + - 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: diff --git a/docs/platforms/python/integrations/wsgi/index.mdx b/docs/platforms/python/integrations/wsgi/index.mdx index bdaa945c1e475..3c43a08f10172 100644 --- a/docs/platforms/python/integrations/wsgi/index.mdx +++ b/docs/platforms/python/integrations/wsgi/index.mdx @@ -60,6 +60,8 @@ make_server('', 8000, app).serve_forever() ## Behavior + + - 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. diff --git a/includes/python-uwsgi-warning.mdx b/includes/python-uwsgi-warning.mdx new file mode 100644 index 0000000000000..3325b5ca43722 --- /dev/null +++ b/includes/python-uwsgi-warning.mdx @@ -0,0 +1,7 @@ + + +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. + +