Add support for filtering events
AlexSun98 opened this issue · 1 comments
AlexSun98 commented
Does the lib support a feature of filtering events? (don't wana assign a new instance of sentry)
Reference:
https://docs.sentry.io/platforms/node/guides/aws-lambda/configuration/filtering
`import * as Sentry from "@sentry/browser";
init({
beforeSend(event, hint) {
const error = hint.originalException;
if (
error &&
error.message &&
error.message.match(/database unavailable/i)
) {
event.fingerprint = ["database-unavailable"];
}
return event;
},
});`
arabold commented
This has been cross-posted and answered here already:
arabold/serverless-sentry-lib#28