Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sentry-node

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sentry-node

simple Node wrapper around Sentry API

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
254
decreased by-21.85%
Maintainers
1
Weekly downloads
 
Created
Source

Sentry-node

Node v0.10 compatible

Build Status

A simple Node wrapper around Sentry API.

Installation

$ npm install sentry-node

Testing

$ npm test

Usage

Creating the Client

var Sentry = require('sentry-node');

You can intialize sentry-node by passing in a Sentry DSN:

var sentry = new Sentry('<your Sentry DSN>');

Or you can set it as an process.env variable:

var sentry = new Sentry();

You can also pass in the config parameters as an object:

var sentry = new Sentry({
  key: '<your sentry public key>',
  secret: '<your sentry secret key>',
  project_id: '<your sentry project id>'
});

Error

sentry.error(err, message, logger, extra);
arguments
sentry.error(new Error("The error method expected an Error instance as first argument."), "Bad arguments to sentry-node:error method", '/sentry-node.coffee', {note: "to test sentry-node error method", version: "0.1.0"});

image

  • err: must be an instance of Error, err.message will be used for the smaller text that appears right under culprit
  • message: culprit, big text that appears at the top
  • logger: the name of the logger which created the record, should be the error logger/handler in your code
  • extra: (optional) an object gives more context about the error in addition to err.stack

Message

sentry.message(message, logger, extra);
arguments
sentry.message("message", "/trial.coffee", {note: "to test sentry-node api", type: "message"});

image

  • message: text will be used for both the big text appears at the top and the smaller text appears right under it
  • logger: the name of the logger which created the record
  • extra: (optional) an object gives more context about the message

Keywords

FAQs

Package last updated on 02 Dec 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc