Skip to content

Conversation

@Flash0ver
Copy link
Member

@Flash0ver Flash0ver commented Apr 28, 2025

closes #13416

DESCRIBE YOUR PR

Add "Data Collected" pages for

  • .NET
  • PowerShell
  • Unity

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline: 2025-04-30
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

EXTRA RESOURCES

@vercel
Copy link

vercel bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 2:04pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview May 12, 2025 2:04pm
develop-docs ⬜️ Ignored (Inspect) Visit Preview May 12, 2025 2:04pm

@codecov
Copy link

codecov bot commented Apr 28, 2025

Bundle Report

Changes will increase total bundle size by 654 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.14MB 660 bytes (0.01%) ⬆️
sentry-docs-client-array-push 9.47MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 868.7kB -0.0%
static/chunks/8165-*.js -3 bytes 410.1kB -0.0%
static/5aBiR8i5T18Q736SKo_hU/_buildManifest.js (New) 578 bytes 578 bytes 100.0% 🚀
static/5aBiR8i5T18Q736SKo_hU/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/QK5UHv_eD_rcs2FOhOjR7/_buildManifest.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️
static/QK5UHv_eD_rcs2FOhOjR7/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.75MB -0.0%
../instrumentation.js -3 bytes 1.08MB -0.0%
9523.js -3 bytes 1.05MB -0.0%
../app/[[...path]]/page.js.nft.json 223 bytes 389.34kB 0.06%
../app/platform-redirect/page.js.nft.json 223 bytes 389.25kB 0.06%
../app/sitemap.xml/route.js.nft.json 223 bytes 387.22kB 0.06%

Comment on lines 39 to 57
## Request URL

The full request URL of outgoing and 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 outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data.

## Request Body

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:

- **The type of the request body:**
- JSON and form bodies are sent
- Raw request bodies are always removed
- Uploaded files in the request bodies are never sent to Sentry
- **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.

If you want to prevent bodies from being sent to Sentry altogether, set `max_request_body_size` to `"never"`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is server-side SDK stuff so not related to PowerShell (or .net in general for that matter, only asp.net)

Suggested change
## Request URL
The full request URL of outgoing and 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 outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data.
## Request Body
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:
- **The type of the request body:**
- JSON and form bodies are sent
- Raw request bodies are always removed
- Uploaded files in the request bodies are never sent to Sentry
- **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.
If you want to prevent bodies from being sent to Sentry altogether, set `max_request_body_size` to `"never"`.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the Request Body stuff platform specific (ASP.NET and ASP.NET Core only).

I think the Request URL and Query string are relevant for other integrations though, since we capture this information on outbound HTTP requests via the SentryHttpMessageHandler.

That may be a bit of an edge case in Powershell...

Comment on lines 71 to 74
## SQL Queries

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not vailable in .net

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaind I've left this in there for the time being as I think it's relevant for the Sentry.DiagnosticSource and Sentry.EntityFramework integrations.

Here, for example, we record the command query in a span description.

We can also capture this information via our OpenTelemetry integration. I got this from an app that calls out to Postgres, for example:
image

@jamescrosswell
Copy link
Collaborator

@bitsandfoxes could I get a sanity check on the Unity stuff from you? I'm not very familiar with our Unity SDK (that would be an understatement).


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

## Local Variables In Stack Trace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PowerShell might have local variables actually, but I don't know.
@vaind does it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the powershell docs so these basically say "see the data collected by the .net skd" now. If there are some minor differences, we can always tweak that to say "except A, B and C as detailed below".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PowerShell might have local variables actually, but I don't know.
@vaind does it?

Yes but we don't capture them at the moment


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.

To start sending logged-in user information, set the option `SendDefaultPii = true` when initializing the Sentry SDK.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure Unity adds User if we flip this flag. @bitsandfoxes ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not. The one place the Unity SDK uses SendDefaultPii for guarding and setting the DeviceUniqueIdentifier here. The rest is in control of the .NET SDK.

@bruno-garcia bruno-garcia marked this pull request as ready for review May 9, 2025 15:00
Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it has one approval, rquesting changes to be clear some changes are needed before we can merge

@bitsandfoxes bitsandfoxes enabled auto-merge (squash) May 12, 2025 13:49
@bitsandfoxes bitsandfoxes merged commit 1ccb14d into master May 12, 2025
11 checks passed
@bitsandfoxes bitsandfoxes deleted the docs/dotnet/add-data-collected branch May 12, 2025 14:04
@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List "Data Collected" for all .NET SDKs

7 participants