getsentry / sentry-python

The official Python SDK for Sentry.io
https://sentry.io/for/python/
MIT License
1.86k stars 486 forks source link

Investigate Sentry_sdk.scrubber to do the same as Sentry Server Scrubbing #2654

Closed Angelodaniel closed 4 months ago

Angelodaniel commented 8 months ago

How do you use Sentry?

Sentry Saas (sentry.io)

Version

Django 1.39.1/1.39.2

Steps to Reproduce

  1. Currently with the use of the scrubber it happens in some cases that the complete POST body of a request gets send.
  2. It get's scrubbed on Server side

But we want to be able to scrub it before it reaches the server.

I am testing and the password field in the POST data is redacted in Sentry, but not when I intercept the event between SDK and Server.

Expected Result

Being able to scrub on SDK side similar on what happens on Server Side

Actual Result

I am testing and the password field in the POST data is redacted in Sentry, but not when I intercept the event between SDK and Server.

sl0thentr0py commented 8 months ago

we are scrubbing the request body here https://github.com/getsentry/sentry-python/blob/8bd2f461789554f4fceff62a10cc9c46910a8429/sentry_sdk/scrubber.py#L84-L85 so I need to know what is not being scrubbed from the user.