Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/contributing/pages/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for performance monitoring.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
37 changes: 37 additions & 0 deletions docs/platforms/go/common/data-management/data-collected.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Data Collected
description: "See what data is collected by the Sentry SDK."
sidebar_order: 1
---

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.

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.

For many of the categories listed here it is required to enable the <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink>.

## HTTP Headers

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.

To start sending HTTP headers, set <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink> to true.

## Cookies

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.

If you want to send cookies, set <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink> to true.

## Users' IP Addresses

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.

To enable sending the user's IP address, set <PlatformLink to="/configuration/options">SendDefaultPII option</PlatformLink> to true.

## Request URL

The full request URL of incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data.

## Request Query String

The full request query string of incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data.
3 changes: 3 additions & 0 deletions docs/platforms/go/common/migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ import (
func main() {
err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
})

if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/echo/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/fasthttp/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/fiber/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for performance monitoring.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/gin/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/http/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/iris/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/negroni/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ if err := sentry.Init(sentry.ClientOptions{
// of transactions for tracing.
// We recommend adjusting this value in production,
TracesSampleRate: 1.0,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
}); err != nil {
fmt.Printf("Sentry initialization failed: %v\n", err)
}
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/slog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func main() {
err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
EnableTracing: false,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
})
if err != nil {
log.Fatal(err)
Expand Down
3 changes: 3 additions & 0 deletions docs/platforms/go/guides/zerolog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ func main() {
// Initialize Sentry
err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event {
// Modify or filter events before sending them to Sentry
return event
Expand Down
3 changes: 3 additions & 0 deletions platform-includes/getting-started-config/go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ func main() {
// Enable printing of SDK debug messages.
// Useful when getting started or trying to figure something out.
Debug: true,
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
})
if err != nil {
log.Fatalf("sentry.Init: %s", err)
Expand Down
3 changes: 3 additions & 0 deletions platform-includes/getting-started-verify/go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import (
func main() {
err := sentry.Init(sentry.ClientOptions{
Dsn: "___PUBLIC_DSN___",
// Adds request headers and IP for users,
// visit: https://docs.sentry.io/platforms/go/data-management/data-collected/ for more info
SendDefaultPII: true,
})
if err != nil {
log.Fatalf("sentry.Init: %s", err)
Expand Down