Ember Options

Additional configuration options for the Ember addon.

All Sentry SDK options can be passed to init:

Copied
import * as Sentry from "@sentry/ember";

Sentry.init({
  // Sentry options
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
});

The @sentry/ember add-on includes options to manage Ember specific instrumentation; these options are set on the add-on config directly.

Copied
ENV["@sentry/ember"] = {
  // Ember specific options
};

The following documentation is for Ember specific configuration, for Sentry options, see basic options

The Sentry tracing integration is already set up via the Ember add on with custom Ember instrumentation for routing, components, and the runloop. It sideloads Sentry performance monitoring as a chunk to instrument your application. If you'd like to disable this automatic instrumentation and stop receiving the associated transactions, set disablePerformance in your config. See example below:

Copied
ENV["@sentry/ember"] = {
  disablePerformance: true,
};

If you would like to capture timings for the beforeModel, model, afterModel hooks as well as setupController in one of your Routes, @sentry/ember exports a instrumentRoutePerformance function which can be used by replacing the default export with a wrapped Route.

Copied
import Route from "@ember/routing/route";
import { instrumentRoutePerformance } from "@sentry/ember";

class MyRoute extends Route {
  model() {
    //...
  }
}

export default instrumentRoutePerformance(MyRoute);

The render times of classic components are also enabled by default, with a setting to capture render timings only above a certain duration. To change this minimum, you can modify minimumComponentRenderDuration in your config.

Copied
ENV["@sentry/ember"] = {
  minimumComponentRenderDuration: 0, // Setting this to zero will capture all classic components.
};

To disable component instrumentation you can set disableInstrumentComponents in your config.

Copied
ENV["@sentry/ember"] = {
  disableInstrumentComponents: true,
};

The duration of each queue in your application's runloop is instrumented by default, as long as the duration of the queue is longer than a threshold defined in your config by minimumRunloopQueueDuration

Copied
ENV["@sentry/ember"] = {
  minimumRunloopQueueDuration: 0, // Setting this to zero will capture all runloop queue durations
};

If you would like to disable runloop instrumentation you can set disableRunloopPerformance in your config.

Copied
ENV["@sentry/ember"] = {
  disableRunloopPerformance: true,
};
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").