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

rollbar

Package Overview
Dependencies
Maintainers
2
Versions
151
Alerts
File Explorer

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.

  • 2.26.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
349K
increased by2.35%
Maintainers
2
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

Keywords

FAQs

Package last updated on 19 Mar 2024

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