Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Ember CLI Deploy plugin to deploy source maps to new relic

License

Notifications You must be signed in to change notification settings

uniplaces/ember-cli-deploy-new-relic-sourcemap

 
 

Repository files navigation

ember-cli-deploy-new-relic-sourcemap

Ember CLI Deploy plugin to upload source maps to New Relic.

What is an ember-cli-deploy plugin?

A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks.

For more information on what plugins are and how they work, please refer to the Plugin Documentation.

Quick Start

To get up and running quickly, do the following:

$ ember install ember-cli-deploy-new-relic-sourcemap
  • Place the following configuration into config/deploy.js
ENV['new-relic-sourcemap'] = {
  // The URL or CDN your assets are served from.
  // Likely the same as the `prepend` in your fingerprint config
  prefix: 'https://your.awesome.site',

  // Application ID Provided by New Relic
  applicationID: '12345678',

  // Admin Key (not application-specific)
  nrAdminKey: 'a98b7a98notd7reallyasda9s8fkey7am'
};
  • Enable sourcemaps in your ember-cli-build.js file
const app = new EmberApp(defaults, {
  sourcemaps: {
    enabled: true
  }
});
  • Enable fingerprinting. (While New Relic supports non-fingerprinted assets, this is not supported by this plugin yet).
const app = new EmberApp(defaults, {
  fingerprint: {
    enabled: true
  }
});

Installation

Run the following command in your terminal:

ember install ember-cli-deploy-new-relic-sourcemap

For general information on how to setup New Relic Sourcemaps, please refer to their API documentation.

ember-cli-deploy Hooks Implemented

For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.

  • configure
  • upload

Configuration Options

For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.

prefix

This is the base URL where your normal javascript assets are served from. (This is likely the same value as what you configure in your fingerprint.prepend setting, if applicable). The fully qualified URL is the only way New Relic knows to map an stack frame to a source map.

Required

applicationId

The New Reclic provided ID for the application for which the source maps are being uploaded.

Required

nrAdminKey

The New Relic provided Admin Key (this is different than the key used to report errors to New Relic).

Required

sourceMapPattern

The minimatch expression to determine which source map files should be uploaded.

Default: '**/*.map'

distDir

The root directory that all files matching the filePattern will be uploaded from. By default, this option will use the distDir property of the deployment context.

Default: context.distDir

Prerequisites

The following properties are expected to be present on the deployment context object:

About

Ember CLI Deploy plugin to deploy source maps to new relic

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%