New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@carisls/sentry-node

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@carisls/sentry-node

Dependency to enable sentry with standard settings

latest
npmnpm
Version
0.4.3
Version published
Maintainers
2
Created
Source

Sentry Node (Express)

Introduction

NPM Version NPM Downloads Install Size

This is a simple tool to add Sentry monitoring to any project built in NodeJS Express.

How to add to your application?

Add this code after you initialize express app.

// Initialize Express app
const express = require('express');
const app = express();

// Add Sentry
const sentryNode = require('@carisls/sentry-node');
sentryNode({
  dsn: process.env.SENTRY_DSN
}, app);

If you want to use more settings, you can do it this way

// Initialize Express app
const express = require('express');
const app = express();

// Add Sentry
const sentryNode = require('@carisls/sentry-node');
sentryNode({
  dsn: process.env.SENTRY_DSN,
  sampleRate: process.env.SENTRY_SAMPLE_RATE,       // defaults to 1.0
  profilingRate: process.env.SENTRY_PROFILING_RATE, // defaults to 1.0
  env: process.env.SENTRY_ENV                       // defaults to local
  release: process.env.GIT_SHA                      // optional code version
}, app);

// Sentry error handler will be setup automatically so it is not needed (as before)

// Application code
// ...

Keywords

sentry

FAQs

Package last updated on 28 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts