-
Notifications
You must be signed in to change notification settings - Fork 592
Open
Description
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
- Configure the Python SDK in a Django project with eventScrubber:
entry_sdk.init(
dsn="...",
send_default_pii=True,
event_scrubber=EventScrubber()
)
- Add user IP via set_user, it can also be added by the SDK via
send_default_pii=True, - Disable the option "Prevent storing IP address" in the project settings
- Sent a test error event
Expected Result
The UI shows the user IP as [Filtered].
Actual Result
The UI shows an error due to invalid IP but the event has a valid IP address:

The error is showing because the IP received by the server is invalid(from the event's JSON):
ip_address": {
"": {
"rem": [
[
"!config",
"s"
]
],
"err": [
[
"invalid_data",
{
"reason": "expected an ip address"
}
]
],
"val": "[Filtered]"
}
}
However, the server also infers the IP address for the event based on the HTTP request sending the event:
"user": {
"ip_address": "127.0.0.1",
"sentry_user": "ip:127.0.0.1"
},
This is what it seems to happen:
- An IP address is added via set_user or default_PII true
- The SDK's event scrubber removes it and replaces with [Filtered]
- The server sees the ip address value as Filtered and mark it as an invalid field in the event
- The server infers the IP address from the HTTP request and add it to the user info
- The UI shows an error (step 3), but also an IP address (Step4).
Product Area
Ingestion and Filtering
Link
https://dev-curumas.sentry.io/issues/7343757920/events/8184ab9875ca46aeafac1a9a53e16f0d/
DSN
No response
Version
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Waiting for: Product Owner