Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Airbrake for your JavaScript application #22

Open
kantord opened this issue Jan 31, 2018 · 0 comments
Open

Setup Airbrake for your JavaScript application #22

kantord opened this issue Jan 31, 2018 · 0 comments

Comments

@kantord
Copy link
Owner

kantord commented Jan 31, 2018

Install Airbrake in 2 easy steps:

Step 1: Add the library
Include via CDN:

<script src="https://cdnjs.cloudflare.com/ajax/libs/airbrake-js/1.0.4/client.min.js"></script>

We also support installation via npm and Bower.

Step 2: Copy this config snippet to your app.js file

(You can find your project ID and API KEY with your project's settings):

var airbrake = new airbrakeJs.Client({
  projectId: <Your project ID>,
  projectKey: '<Your project API Key>'
});
airbrake.addFilter(function (notice) {
  notice.context.environment = 'production';
  return notice;
});

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

airbrake.notify('hey there!')

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

@kantord kantord added the to do label Feb 12, 2018
@kantord kantord added this to To do in just-dashboard Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
just-dashboard
  
To do
Development

No branches or pull requests

1 participant