sentry-javascript: event.user is empty?
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.21.0
Framework Version
Next.js v12.3.0
Link to Sentry event
No response
Steps to Reproduce
- I add
sendDefaultPii: trueoption to mysentry.client.config.js - I console log the event with
beforeSend(event){ console.log(event) }to see what’s sent. - The event has the following properties:
{
breadcrumbs,
environment,
event_id,
exception,
extra,
level,
platform,
release,
request,
sdk,
tags,
timestamp;
}
Expected Result
I don’t see any user property, even though it’s highlighted in the Data scrubbing example
However, with sendDefaultPii: true the IP address of the client does show up in the Sentry dashboard.
Actual Result
The user property should have the clients IP address since it was enabled with sendDefaultPii
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (8 by maintainers)
For certain backend frameworks in the Node SDK we grab the IP off the request object.
For browser errors, we collect the IP on our servers: https://docs.sentry.io/platforms/javascript/enriching-events/identify-user/#ip_address