Ember Options
All Sentry SDK options can be passed to init
:
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.
ENV["@sentry/ember"] = {
// Ember specific options
};
The following documentation is for Ember specific configuration, for Sentry options, see basic options
Performance Monitoring Considerations
The Sentry
disablePerformance
in your config. See example below:
ENV["@sentry/ember"] = {
disablePerformance: true,
};
Routes
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.
import Route from "@ember/routing/route";
import { instrumentRoutePerformance } from "@sentry/ember";
class MyRoute extends Route {
model() {
//...
}
}
export default instrumentRoutePerformance(MyRoute);
Classic Components
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.
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.
ENV["@sentry/ember"] = {
disableInstrumentComponents: true,
};
Runloop
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
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.
ENV["@sentry/ember"] = {
disableRunloopPerformance: true,
};
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").
- Package:
- npm:@sentry/browser
- Version:
- 7.85.0
- Repository:
- https://github.com/getsentry/sentry-javascript