asbhogal / JavaScript-Reaction-Tester-Project

A project which measures how quick it takes the user to click the shape on the screen, then displays the time in seconds. A different shape and color is shown each time.
java-script-reaction-tester-project.vercel.app
1 stars 0 forks source link

Setup Airbrake for your JavaScript application #1

Closed asbhogal closed 2 years ago

asbhogal commented 2 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, start up your JS project locally. Then visit it in your browser (eg: http://localhost:1080), open the JS console, and paste in the following to trigger a test error:

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

This should send a test error to your Airbrake project.

Full documentation

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

asbhogal commented 2 years ago

Airbrake integration cancelled.