🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

rollbar

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollbar

Effortlessly track and debug errors in your JavaScript applications with Rollbar. This package includes advanced error tracking features and an intuitive interface to help you identify and fix issues more quickly.

3.0.0-alpha.2
latest
Version published
Weekly downloads
385K
-0.98%
Maintainers
3
Weekly downloads
 
Created

What is rollbar?

Rollbar is a real-time error tracking and monitoring tool for JavaScript applications. It helps developers to detect, diagnose, and fix errors in their applications by providing detailed error reports and notifications.

What are rollbar's main functionalities?

Error Tracking

Rollbar can automatically capture and report uncaught exceptions and unhandled promise rejections. This helps in tracking errors that occur in the application.

const Rollbar = require('rollbar');
const rollbar = new Rollbar({
  accessToken: 'YOUR_ACCESS_TOKEN',
  captureUncaught: true,
  captureUnhandledRejections: true
});

// Example of tracking an error
try {
  throw new Error('Test error');
} catch (e) {
  rollbar.error(e);
}

Custom Logging

Rollbar allows custom logging of messages, warnings, and info messages. This can be useful for tracking specific events or conditions in the application.

const Rollbar = require('rollbar');
const rollbar = new Rollbar({
  accessToken: 'YOUR_ACCESS_TOKEN'
});

// Log a custom message
rollbar.log('Custom log message');

// Log a warning
rollbar.warning('This is a warning');

// Log an info message
rollbar.info('This is an info message');

Telemetry

Rollbar can capture telemetry data such as console logs, network requests, and DOM events. This helps in understanding the context in which an error occurred.

const Rollbar = require('rollbar');
const rollbar = new Rollbar({
  accessToken: 'YOUR_ACCESS_TOKEN',
  captureUncaught: true,
  captureUnhandledRejections: true,
  autoInstrument: true
});

// Example of adding custom telemetry data
rollbar.configure({
  payload: {
    telemetry: [
      { type: 'log', level: 'info', body: 'Custom telemetry data' }
    ]
  }
});

Other packages similar to rollbar

FAQs

Package last updated on 26 Jun 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