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
this disclaimer
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
15}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code


Related snippets