Snippets Collections
//Install the Rollbar rollbar.js package using npm:
// npm install --save rollbar

// include and initialize the rollbar library with your access token
var Rollbar = require('rollbar')
var rollbar = new Rollbar({
  accessToken: '<ACCESS_TOKEN>',
  captureUncaught: true,
  captureUnhandledRejections: true,

// record a generic message and send it to Rollbar
rollbar.log('Hello world!')

Mon Nov 28 2022 04:12:19 GMT+0000 (UTC)

#javascript #nodejs #rollbar

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension