simplabs/ember-cli-sentry

Name: ember-cli-sentry

Owner: simplabs

Description: Add support for Sentry to Ember.js

Forked from: damiencaselli/ember-cli-sentry

Created: 2017-09-13 13:19:20.0

Updated: 2018-04-24 14:20:36.0

Pushed: 2018-04-24 14:20:30.0

Homepage: http://damiencaselli.github.io/ember-cli-sentry/

Size: 900

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ember-cli-sentry

An ember-cli addon adding Sentry support.

Docs are available here.

What it does (and does not)

This addon does:

This addon does not:

Install
r install ember-cli-sentry

Note: Since v3.0.0, raven-js package is automatically included by this addon.

Configuration
TLDR
onfig/environment.js

le.exports = function(environment) {
r ENV = {

/* config */

sentry: {
  dsn: 'https://<dummykey>@app.getsentry.com/<dummyproject>'
}


Complete config
onfig/environment.js

le.exports = function(environment) {
r ENV = {

/* config */

sentry: {
  /**
   * The only mandatory parameter.
   *
   * @type {String}
   */
  dsn: 'https://<dummykey>@app.getsentry.com/<dummyproject>',

  /**
   * Sets Raven.debug property when running `Raven.config`.
   *
   * @type {Boolean}
   * @default true
   */
  debug: true,

  /**
   * If set to true, it will prevent Raven.js from being initialized.
   * Errors and logs will be logged to the console (default) instead of
   * being reported by Raven.
   *
   * @type {Boolean}
   * @default undefined
   */
  development: false,

  /**
   * If set to true, addon will try to have Ember.onerror
   * and Ember.RSVP.on('error') captured by Raven.
   *
   * @type {Boolean}
   * @default true
   */
  globalErrorCatching: true,

  /**
   * Raven.js option.
   *
   * @type {Array}
   * @default []
   */
  includePaths: [],

  /**
   * Raven.js option.
   *
   * @type {Array}
   * @default []
   */
  whitelistUrls: [],

  /**
   * Options to pass directly to Raven.js. Note: whitelistUrls and
   * includePaths in this will take precedence
   * over the above.
   *
   * @default {}
   */
  ravenOptions: {},
}


Content Security Policy

To allow Ravenjs to work properly, you need to add a couple of thing to the content security policy rules:

ipt-src': "'self' 'unsafe-inline' 'unsafe-eval'",
-src': "data: app.getsentry.com",
nect-src': "'self' app.getsentry.com"
Meaningless stack traces?

See this issue.

Example

The dummy application in tests is a working example with a couple of logging here and there, and a default logger.

Dependencies

Raven.js

Licence

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.