https://github.com/ember-cli-sentry/ember-cli-sentry
Error tracking via Sentry for Ember.js apps
https://github.com/ember-cli-sentry/ember-cli-sentry
ember ember-addon raven sentry
Last synced: 9 months ago
JSON representation
Error tracking via Sentry for Ember.js apps
- Host: GitHub
- URL: https://github.com/ember-cli-sentry/ember-cli-sentry
- Owner: ember-cli-sentry
- License: mit
- Created: 2015-02-04T12:47:31.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-12-01T09:52:22.000Z (about 3 years ago)
- Last Synced: 2025-04-02T02:14:44.492Z (10 months ago)
- Topics: ember, ember-addon, raven, sentry
- Language: JavaScript
- Homepage:
- Size: 1 MB
- Stars: 81
- Watchers: 3
- Forks: 64
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
ember-cli-sentry
===============================================================================
An ember-cli addon adding [Sentry](https://www.getsentry.com) support.
---
**⚠️ this repository isn't maintained any longer ⚠️**
➡️ See [the official Sentry's Ember addon documentation](https://docs.sentry.io/platforms/javascript/guides/ember/).
---
Requirements
-------------------------------------------------------------------------------
- Node.js 6 or higher is required to use this addon
- Ember CLI 2.13 or higher is required to use this addon
Install
-------------------------------------------------------------------------------
```
ember install ember-cli-sentry
```
Usage
-------------------------------------------------------------------------------
### TLDR
```js
// config/environment.js
module.exports = function(environment) {
var ENV = {
/* config */
sentry: {
dsn: 'https://@app.getsentry.com/'
}
}
}
```
### Complete config
```js
// config/environment.js
module.exports = function(environment) {
var ENV = {
/* config */
sentry: {
/**
* The only mandatory parameter.
*
* @type {String}
*/
dsn: 'https://@app.getsentry.com/',
/**
* 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,
/**
* Pass the environment to Raven.js
*
* @type {String}
* @default undefined
*/
environment: environment,
/**
* 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:
```
'script-src': "'self' 'unsafe-inline' 'unsafe-eval'",
'img-src': "data: app.getsentry.com",
'connect-src': "'self' app.getsentry.com"
```
### Meaningless stack traces?
See [this issue](https://github.com/ember-cli-sentry/ember-cli-sentry/issues/28).
### Example
The dummy application in tests is a working example with a couple of logging here and there, and a default logger.
Licence
-------------------------------------------------------------------------------
[MIT](https://raw.githubusercontent.com/ember-cli-sentry/ember-cli-sentry/master/LICENSE.md)