Integrate your deploy pipeline with Sentry. Upload sourcemaps, assign related commits and manage releases.
- ember-cli-deploy v1.0 or above
- Node.js v8 or above
ember install ember-cli-deploy-sentry-cli
Turn on sourcemaps generation in ember-cli-build.js config:
{
sourcemaps: {
enabled: true,
extensions: ['js']
}
}Add plugin config to your config/deploy.js:
{
'sentry-cli': {
appName: 'sentry-app-name',
orgName: 'sentry-org-name',
authToken: process.env.SENTRY_AUTH_TOKEN
// url: 'https://your-custom-sentry-server.test/` // in case of self-hosted server
}
}Optionaly set revision type to version-commit to have unified versioning pattern:
{
'revision-data': {
type: 'version-commit'
}
}Leave the rest for sentry-cli ;) Deploy! 🚀✌️
Your authToken needs to have following scopes: org:read and project:releases
Your application repository needs to be connected on Sentry to your ogranization account and connected with the project.
Make sure your app's moudlePrefix is equal to your Sentry appName, and your revision-data type in config/deploy.js is using the same versioning strategy. In most cases you should use version-commit
- Install Sentry:
npm i @sentry/browser @sentry/integrations
- Add sentry config to
config/environment.jsfile
// config/environment.js
// Add following config
{
sentry: {
dsn: 'your-app-dsn'
}
}- Configure Sentry instance with defaults.
Remember to define
environmentandrelease
// app/sentry.js
import * as Sentry from '@sentry/browser';
import { Ember } from '@sentry/integrations/esm/ember';
import config from 'web-app/config/environment';
const sentryConfig = config.sentry || {};
export function startSentry() {
Sentry.init({
environment: config.environment,
release: `${config.modulePrefix}@${config.APP.version}`,
...sentryConfig,
integrations: [new Ember()]
});
}- Initialize Sentry at the begining of
app/index.jsfile
// app/index.js
import { startSentry } from './sentry';
startSentry();More info: https://simplabs.com/blog/2019/07/15/sentry-and-ember
This project is licensed under the MIT License.