Skip to content

Commit 13d2803

Browse files
giortzisgbitsandfoxes
authored andcommitted
Document data collection for Go & add SendDefaultPII option on docs (#13404)
1 parent b7544f7 commit 13d2803

File tree

14 files changed

+76
-0
lines changed

14 files changed

+76
-0
lines changed

docs/contributing/pages/components.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ if err := sentry.Init(sentry.ClientOptions{
445445
// of transactions for performance monitoring.
446446
// We recommend adjusting this value in production,
447447
TracesSampleRate: 1.0,
448+
// Adds request headers and IP for users,
449+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
450+
SendDefaultPII: true,
448451
}); err != nil {
449452
fmt.Printf("Sentry initialization failed: %v\n", err)
450453
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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. This page lists data categories that the Sentry Go SDK collects.
10+
11+
For many of the categories listed here it is required to enable the <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink>.
12+
13+
## HTTP Headers
14+
15+
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-go/blob/master/interfaces.go#L157-163) in place, which filters out any headers that contain sensitive data.
16+
17+
To start sending HTTP headers, set <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink> to true.
18+
19+
## Cookies
20+
21+
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.
22+
23+
If you want to send cookies, set <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink> to true.
24+
25+
## Users' IP Addresses
26+
27+
By default, the Sentry SDK doesn't send the user's IP address. Once enabled, the Sentry backend services will infer the user ip address based on the incoming request, unless certain integrations you can enable override this behavior.
28+
29+
To enable sending the user's IP address, set <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink> to true.
30+
31+
## Request URL
32+
33+
The full request URL of incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data.
34+
35+
## Request Query String
36+
37+
The full request query string of incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data.

docs/platforms/go/common/migration.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ import (
4444
func main() {
4545
err := sentry.Init(sentry.ClientOptions{
4646
Dsn: "___PUBLIC_DSN___",
47+
// Adds request headers and IP for users,
48+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
49+
SendDefaultPII: true,
4750
})
4851

4952
if err != nil {

docs/platforms/go/guides/echo/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ if err := sentry.Init(sentry.ClientOptions{
4747
// of transactions for tracing.
4848
// We recommend adjusting this value in production,
4949
TracesSampleRate: 1.0,
50+
// Adds request headers and IP for users,
51+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
52+
SendDefaultPII: true,
5053
}); err != nil {
5154
fmt.Printf("Sentry initialization failed: %v\n", err)
5255
}

docs/platforms/go/guides/fasthttp/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ if err := sentry.Init(sentry.ClientOptions{
4646
// of transactions for tracing.
4747
// We recommend adjusting this value in production,
4848
TracesSampleRate: 1.0,
49+
// Adds request headers and IP for users,
50+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
51+
SendDefaultPII: true,
4952
}); err != nil {
5053
fmt.Printf("Sentry initialization failed: %v\n", err)
5154
}

docs/platforms/go/guides/fiber/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ if err := sentry.Init(sentry.ClientOptions{
3535
// of transactions for performance monitoring.
3636
// We recommend adjusting this value in production,
3737
TracesSampleRate: 1.0,
38+
// Adds request headers and IP for users,
39+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
40+
SendDefaultPII: true,
3841
}); err != nil {
3942
fmt.Printf("Sentry initialization failed: %v\n", err)
4043
}

docs/platforms/go/guides/gin/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ if err := sentry.Init(sentry.ClientOptions{
4747
// of transactions for tracing.
4848
// We recommend adjusting this value in production,
4949
TracesSampleRate: 1.0,
50+
// Adds request headers and IP for users,
51+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
52+
SendDefaultPII: true,
5053
}); err != nil {
5154
fmt.Printf("Sentry initialization failed: %v\n", err)
5255
}

docs/platforms/go/guides/http/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ if err := sentry.Init(sentry.ClientOptions{
4646
// of transactions for tracing.
4747
// We recommend adjusting this value in production,
4848
TracesSampleRate: 1.0,
49+
// Adds request headers and IP for users,
50+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
51+
SendDefaultPII: true,
4952
}); err != nil {
5053
fmt.Printf("Sentry initialization failed: %v\n", err)
5154
}

docs/platforms/go/guides/iris/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ if err := sentry.Init(sentry.ClientOptions{
4646
// of transactions for tracing.
4747
// We recommend adjusting this value in production,
4848
TracesSampleRate: 1.0,
49+
// Adds request headers and IP for users,
50+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
51+
SendDefaultPII: true,
4952
}); err != nil {
5053
fmt.Printf("Sentry initialization failed: %v\n", err)
5154
}

docs/platforms/go/guides/negroni/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ if err := sentry.Init(sentry.ClientOptions{
4747
// of transactions for tracing.
4848
// We recommend adjusting this value in production,
4949
TracesSampleRate: 1.0,
50+
// Adds request headers and IP for users,
51+
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
52+
SendDefaultPII: true,
5053
}); err != nil {
5154
fmt.Printf("Sentry initialization failed: %v\n", err)
5255
}

0 commit comments

Comments
 (0)