VentsislavDinev / VBlog

Modular Domain driven news system.
Apache License 2.0
1 stars 0 forks source link

Setup Airbrake for your JavaScript application #1

Open VentsislavDinev opened 4 years ago

VentsislavDinev commented 4 years ago

Installation

Add the library

npm install @airbrake/browser

Configuration

(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);

Full documentation

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

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.