Skip to content

Commit dfbbd4b

Browse files
authored
feat(ruby): Add Data Collected page (#12669)
1 parent 84b74d6 commit dfbbd4b

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Data Collected
3+
description: "See what data is collected by the Sentry SDK."
4+
sidebar_order: 1
5+
---
6+
7+
Sentry takes data privacy very seriously and has default settings in place that prioritize data safety, especially when it comes to personally identifiable information (PII) data. When you add the Sentry SDK to your application, you allow it to collect data and send it to Sentry during the runtime of your application.
8+
9+
The category types and amount of data collected vary, depending on the integrations you've enabled in the Sentry SDK. Here's a list of data categories the Sentry Python SDK collects:
10+
11+
## HTTP Headers
12+
13+
By default, the Sentry SDK will include non-sensitive HTTP headers from a `Rack` request. Sensitive headers such as IP addresses and `HTTP_AUTHORIZATION` will be filtered out by default.
14+
15+
To start sending all HTTP headers, set `send_default_pii = true` in the `Sentry.init` call.
16+
17+
## Cookies
18+
19+
By default, the Sentry SDK doesn't send cookies.
20+
21+
If you want to send cookies, set `send_default_pii = true` in the `Sentry.init` call.
22+
23+
## Users' IP Address
24+
25+
By default, the Sentry SDK doesn't send the user's IP address.
26+
27+
To enable sending the user's [IP addresses from the Rack environment](https://github.com/getsentry/sentry-ruby/blob/cc1dc53c0d60a21db7ad95cac05590ec23c82910/sentry-ruby/lib/sentry/interfaces/request.rb#L7-L12), set `send_default_pii = true` in the `Sentry.init` call.
28+
29+
## Request URL
30+
31+
The request URL (without query string) of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could potentially contain PII data.
32+
33+
## Request Query String
34+
35+
The query string of outgoing and incoming HTTP requests is only sent to Sentry if `send_default_pii = true` since they could potentially contain PII data (such as auth tokens).
36+
37+
## Request Body
38+
39+
The request body of incoming HTTP requests is sent to Sentry only if `send_default_pii = true`.
40+
41+
We try to decode JSON and form data bodies in UTF-8 encoding. Raw byte payloads will not be sent to Sentry.
42+
43+
## Source Context
44+
45+
When an unhandled exception is sent to Sentry, a snapshot of the source code surrounding the line where the error originates is sent with it.
46+
47+
To opt out of sending this source context to Sentry, set `context_lines = nil`.
48+
49+
## Local Variables In Stack Trace
50+
51+
By default, Sentry for Ruby does not include local variables in the frames of captured exceptions, mainly due to performance overhead reasons.
52+
53+
You can start sending local variables to Sentry by setting `include_local_variables = true` in the `Sentry.init` call.
54+
55+
## SQL Queries
56+
57+
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.

0 commit comments

Comments
 (0)