How to use 'sentry express' in JavaScript

Every line of 'sentry express' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
3function initialiseSentry () {
4 Sentry.init({
5 dsn: process.env.SENTRY_DSN,
6 environment: process.env.ENVIRONMENT,
7 beforeSend (event) {
8 if (event.request) {
9 delete event.request // This can include sensitive data such as card numbers
10 }
11 return event
12 }
13 })
14 return Sentry

Related snippets