Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-deploy-sentry-cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-deploy-sentry-cli

Sentry CLI integration for ember-cli-deploy

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ember-cli-deploy-sentry-cli

Integrate your deploy pipeline with Sentry. Upload sourcemaps, assign related commits and manage releases.

Compatibility

  • ember-cli-deploy v1.0 or above
  • Node.js v12 or above

Installation

ember install ember-cli-deploy-sentry-cli

Usage

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,
    urlPrefix: '', // if you need prefix for Sentry to catch like ~/assets
    // 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! 🚀✌️

FAQ & Possible errors

1. You do not have permission to perform this action

Make sure your authToken is present https://sentry.io/settings/account/api/auth-tokens/ and has following scopes: org:read and project:releases

2. Could not determine any commits to be associated automatically.

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

BONUS: Integrate your app with Sentry

  1. Install Sentry:

npm i @sentry/browser @sentry/integrations

  1. Add sentry config to config/environment.js file
// config/environment.js

// Add following config
{
  sentry: {
    dsn: 'your-app-dsn'
  }
}
  1. Configure Sentry instance with defaults. Remember to define environment and release
// 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()]
  });
}
  1. Initialize Sentry at the begining of app/app.js file
// app/app.js

import { startSentry } from './sentry';

startSentry();

More info: https://simplabs.com/blog/2019/07/15/sentry-and-ember

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 28 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc