1.0.0 • Published 1 year ago
@chanzuckerberg/sentry-js-pii-scrubber v1.0.0
sentry-js-pii-scrubber
Utility for scrubbing Personal Identifiable Information from Sentry errors for Javascript SDKs. This package uses the same PII scrubbing logic as is defined in sentry-error-reporter for the Ruby on Rails Sentry SDK.
Installation
Install @chanzuckerberg/sentry-js-pii-scrubber
with your favorite package manager. E.g.
npm install --save @chanzuckerberg/sentry-js-pii-scrubber
Utilities
scrubEvent
Scrubs PII from a given event using sentry-error-reporter
scrubbing logic.
Use the scrubEvent
utility in the beforeSend
hook during initialization.
import {scrubEvent} from "@chanzuckerberg/sentry-js-pii-scrubber";
Sentry.init({
beforeSend(event) {
return scrubEvent(event);
},
...
});