markdown-it-textual-uml icon indicating copy to clipboard operation
markdown-it-textual-uml copied to clipboard

Setup Airbrake for your JavaScript application

Open manastalukdar opened this issue 4 years ago • 0 comments

Step 1: Add the library

npm install @airbrake/browser

Step 2: Configure the library

(You can find your project ID and API key in your project's settings)

import { Notifier } from '@airbrake/browser';

const airbrake = new Notifier({
  projectId: <Your project ID>,
  projectKey: '<Your project API Key>',
  environment: 'production'
});

To test that Airbrake has been installed correctly in your project, open up the JavaScript console in your browser and paste in:

window.onerror("TestError: This is a test", "path/to/file.js", 123);

Visit our official GitHub repo for more info on alternative configurations and advanced options.

manastalukdar avatar Jun 12 '20 19:06 manastalukdar