question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

event.user is empty?

See original GitHub issue

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/nextjs

SDK Version

7.21.0

Framework Version

Next.js v12.3.0

Link to Sentry event

No response

Steps to Reproduce

  1. I add sendDefaultPii: true option to my sentry.client.config.js
  2. I console log the event with beforeSend(event){ console.log(event) } to see what’s sent.
  3. 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

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lforstcommented, Dec 2, 2022

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

To opt out of storing users’ IP addresses in your event data, you can go to your project settings, click on “Security & Privacy”, and enable “Prevent Storing of IP Addresses” or use Sentry’s server-side data scrubbing to remove $user.ip_address. Adding such a rule ultimately overrules any other logic.

0reactions
larsqacommented, Dec 6, 2022

Alright - then I’ll open a documentation issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

userEvent.type with empty string causes a warning about an ...
The warning seems to be an unhandled rejected promise, so an actual error was thrown. The warning was not emitted using user-event 12...
Read more >
Event.user.user_id empty on passwordless Post User ...
If you try using this postHook with passwordless users the userID is not present and you are not able to assign them a...
Read more >
FAQ: Why is this user counted under '(none)' or an unexpected ...
This article will cover some of the more common reasons why your users have null and unexpected property values. Event properties. Amplitude is...
Read more >
[SOLVED] Account Auditing enabled, but Event Log empty
Solution: What do you see when you run this from elevated command prompt on one of the DCs?AuditPol.exe /get /subcategory:"Computer Account ...
Read more >
Windows Server 2019 Event Viewer Empty - Microsoft Q&A
Windows Server 2019 Event Viewer Empty ... To user who report this as advertising, "Windows Event Log" is built-in component of Windows, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found