bugsnag / bugsnag-js

JavaScript error handling tool for BugSnag. Monitor and report JavaScript bugs & errors.
https://docs.bugsnag.com/platforms/javascript
MIT License
856 stars 251 forks source link

Hashed IP Addresses #2206

Closed guy-pimloc closed 2 weeks ago

guy-pimloc commented 1 month ago

Description

I want to be able to snooze and ignore errors from certain IP addresses. Our website keeps on getting clientside errors which we think are coming from Microsoft Outlook safe link scan.

The problem is that we are not able to store the IP addresses of our European customers in your datacenter in US.

Describe the solution you'd like

Similarly to how I can configure IP collection:

Bugsnag.start({ collectUserIp: false })

I'm unsure about the naming, but It would be nice to have an option like:

Bugsnag.start({ collectUserIp: 'obfuscate'  })

Describe alternatives you've considered

I could also try a clientside fingerprinting library like https://github.com/fingerprintjs/fingerprintjs that you suggest in your docs. However it seems more robust, and more efficient to store a hash of an IP address instead.

Additional context

clr182 commented 1 month ago

Hi @guy-pimloc

Thank you for reaching out.

Our website keeps on getting clientside errors which we think are coming from https://github.com/getsentry/sentry-javascript/issues/3440#issuecomment-865857552.

If you are sure that the error is unnecessary for your debugging and triage, you could you a callback method to discard the error caused by microsoft soft scans on your client side by checking the event object.

Additionally, you. could use our redactedKeys configuration option in a callback method to redact the reported IP for devices with a locale other than EU-US. However the drawback of this approach would be the reliability of the reported locale and the users region. Sometimes, locale settings might not accurately reflect the user's physical location.

clr182 commented 2 weeks ago

Hi @guy-pimloc

I am closing this issue for inactivity. If you have any additional questions please feel free to reach out and we can re-open this issue.