You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/python/configuration/options.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ Grouping in Sentry is different for events with stack traces and without. As a r
95
95
96
96
<ConfigKeyname="send-default-pii">
97
97
98
-
If this flag is enabled, certain personally identifiable information (PII) is added by active integrations. By default, no such data is sent.
98
+
If this flag is enabled, [certain personally identifiable information (PII)](/platforms/python/data-management/data-collected/) is added by active integrations. By default, no such data is sent.
Copy file name to clipboardExpand all lines: docs/platforms/python/data-management/data-collected.mdx
+13-7
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,19 @@ The category types and amount of data collected vary, depending on the integrati
10
10
11
11
## HTTP Headers
12
12
13
-
By default, the Sentry SDK doesn't send any HTTP headers. Even when sending HTTP headers is enabled, we have a [Denylist](https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/_wsgi_common.py#L19-L26) in place, which filters out any headers that contain sensitive data.
13
+
By default, the Sentry SDK doesn't send any HTTP headers. Even when sending HTTP headers is enabled, we have a [denylist](https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/_wsgi_common.py#L19-L26) in place, which filters out any headers that contain sensitive data.
14
14
15
15
To start sending HTTP headers, set `send_default_pii=True` in the `sentry_sdk.init()` call.
16
16
17
17
## Cookies
18
18
19
-
By default, the Sentry SDK doesn't send cookies. Sentry tries to remove any cookies that contain sensitive information, (such as the Session ID and CSRF Token cookies in Django).
19
+
By default, the Sentry SDK doesn't send cookies. Sentry tries to remove any cookies that contain sensitive information, such as the Session ID and CSRF Token cookies in Django.
20
20
21
21
If you want to send cookies, set `send_default_pii=True` in the `sentry_sdk.init()` call.
22
22
23
23
## Information About Logged-in User
24
24
25
-
By default, the Sentry SDK doesn't send any information about the logged-in user, (such as email address, user id, or username). Even if enabled, the type of logged-in user information you'll be able to send depends on the integrations you enable in Sentry's SDK. Most integrations won't send any user information. Some will only set the user id, but there are a few that will set the user id, username, and email address.
25
+
By default, the Sentry SDK doesn't send any information about the logged-in user, such as email address, user ID, or username. Even if enabled, the type of logged-in user information you'll be able to send depends on the integrations you enable in Sentry's SDK. Most integrations won't send any user information. Some will only set the user ID, but there are a few that will set the user ID, username, and email address.
26
26
27
27
To start sending logged-in user information, set `send_default_pii=True` in the `sentry_sdk.init()` call.
28
28
@@ -45,9 +45,9 @@ The full request query string of outgoing and incoming HTTP requests is **always
45
45
The request body of incoming HTTP requests can be sent to Sentry. Whether it's sent or not, depends on the type and size of request body as described below:
46
46
47
47
-**The type of the request body:**
48
-
-JSON and form bodies are sent
49
-
-Raw request bodies are always removed
50
-
-Uploaded files in the request bodies are never sent to Sentry
48
+
-JSON and form bodies are sent
49
+
-Raw request bodies are always removed
50
+
-Uploaded files in the request bodies are never sent to Sentry
51
51
-**The size of the request body:** There's a ["max_request_body_size"](/platforms/python/configuration/options/#max-request-body-size) option that's set to `medium` by default. This means that larger request bodies aren't sent to Sentry.
52
52
53
53
If you want to prevent bodies from being sent to Sentry altogether, set `max_request_body_size` to `"never"`.
@@ -60,10 +60,16 @@ To opt out of sending this source context to Sentry, set `include_source_context
60
60
61
61
## Local Variables In Stack Trace
62
62
63
-
When unhandled errors and exceptions are sent to Sentry, the names and values of local variables that were set when the errors occurred, are sent at the same time.
63
+
When unhandled errors and exceptions are sent to Sentry, the names and values of local variables that were set when the errors occurred are sent at the same time.
64
64
65
65
You can stop sending local variables to Sentry by setting `include_local_variables=False` in the `sentry_sdk.init()` call.
66
66
67
67
## SQL Queries
68
68
69
69
While SQL queries are sent to Sentry, neither the full SQL query (`UPDATE app_user SET password='supersecret' WHERE id=1;`), nor the values of its parameters will ever be sent. A parameterized version of the query (`UPDATE app_user SET password='%s' WHERE id=%s;`) is sent instead.
70
+
71
+
## LLM Inputs And Responses
72
+
73
+
When using Sentry in your AI apps, the SDK by default won't add data like LLM inputs and responses to spans. To start recording these, add `send_default_pii=True` to your `sentry_sdk.init()` call.
74
+
75
+
Most AI integrations have an additional parameter to control whether prompts should be included called `include_prompts`. See the <PlatformLinkto="/integrations/#ai">documentation for the specific AI framework</PlatformLink> for more information.
0 commit comments