From ec9b836ee2d03e5dd0357d3060d0d6d9e9e37e18 Mon Sep 17 00:00:00 2001 From: k-fish Date: Fri, 28 Aug 2020 10:40:42 -0700 Subject: [PATCH 01/34] feat: New Ember docs This updates the documentation to point at the new Ember addon --- .../javascript/guides/ember/ember2.mdx | 64 +++++++++++++++ .../javascript/guides/ember/index.mdx | 80 +++++++++---------- 2 files changed, 101 insertions(+), 43 deletions(-) create mode 100644 src/platforms/javascript/guides/ember/ember2.mdx diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx new file mode 100644 index 0000000000000..acbc73883589c --- /dev/null +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -0,0 +1,64 @@ +--- +title: Ember 2.x +redirect_from: + - /clients/javascript/integrations/ember/ +--- + +To use Sentry with your Ember application, you will need to use Sentry’s browser JavaScript SDK: `@sentry/browser`. + +On its own, `@sentry/browser` will report any uncaught exceptions triggered from your application. +In order to use ESM imports without any additional configuration, you can use `ember-auto-import` +by installing it with `ember install ember-auto-import`. + +Starting with version `5.x` our `Ember` integration lives in it's own package `@sentry/integrations`. +You can install it with `npm` / `yarn` like: + +```bash +# Using yarn +yarn add @sentry/integrations + +# Using npm +npm install @sentry/integrations +``` + +Then add this to your `app.js`: + +```javascript +import * as Sentry from "@sentry/browser"; +import { Ember as EmberIntegration } from "@sentry/integrations"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [new EmberIntegration()], +}); +``` + +In case you are using the CDN version or the Loader, we provide a standalone file for every integration, you can use it +like this: + +```html + + + + + + + + +``` + + + diff --git a/src/platforms/javascript/guides/ember/index.mdx b/src/platforms/javascript/guides/ember/index.mdx index 95174c96472b0..3db39940d9b1b 100644 --- a/src/platforms/javascript/guides/ember/index.mdx +++ b/src/platforms/javascript/guides/ember/index.mdx @@ -6,60 +6,54 @@ redirect_from: - /clients/javascript/integrations/ember/ --- -To use Sentry with your Ember application, you will need to use Sentry’s browser JavaScript SDK: `@sentry/browser`. +On this page, we provide concise information to get you up and running with Sentry's Ember SDK, automatically reporting errors and exceptions in your application. -On its own, `@sentry/browser` will report any uncaught exceptions triggered from your application. -In order to use ESM imports without any additional configuration, you can use `ember-auto-import` -by installing it with `ember install ember-auto-import`. +**Note:** If you don't already have an account and Sentry project established, head over to [sentry.io](https://sentry.io/signup/), then return to this page. -Starting with version `5.x` our `Ember` integration lives in it's own package `@sentry/integrations`. -You can install it with `npm` / `yarn` like: +Currently supports all lts versions of Ember 3.x -```bash -# Using yarn -yarn add @sentry/integrations +## Install + +Sentry captures data by using an SDK within your application’s runtime. Add the Ember addon using ember-cli: -# Using npm -npm install @sentry/integrations +```bash +ember install @sentry/ember ``` -Then add this to your `app.js`: +## Configure + +You should initialize the Sentry Ember SDK as soon as possible during your application load up, before initializing the +application in `app.js`: ```javascript -import * as Sentry from "@sentry/browser"; -import { Ember as EmberIntegration } from "@sentry/integrations"; +import Application from '@ember/application'; +import Resolver from 'ember-resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from './config/environment'; + +import { InitSentryForEmber } from '@sentry/ember'; -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [new EmberIntegration()], -}); +InitSentryForEmber(); + +export default class App extends Application { + modulePrefix = config.modulePrefix; + podModulePrefix = config.podModulePrefix; + Resolver = Resolver; +} ``` -In case you are using the CDN version or the Loader, we provide a standalone file for every integration, you can use it -like this: - -```html - - - - - - - - +Then add the following config to your `config/environment.js`: + +```javascript +ENV['@sentry/ember'] = { + sentry: { + dsn: '___PUBLIC_DSN___', + } +}; ``` +Once this is done, all unhandled exceptions are automatically captured by Sentry. + +**Important:** Note your DSN. The _DSN_ (Data Source Name) tells the SDK where to send events. If you forget it, view _Settings -> Projects -> Client Keys (DSN)_ in the Sentry web UI. + From 5d35cf3a5f9cd468814e56e76cf81ad23a1ed6f0 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 8 Sep 2020 12:07:29 -0700 Subject: [PATCH 02/34] Update src/platforms/javascript/guides/ember/index.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/platforms/javascript/guides/ember/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/index.mdx b/src/platforms/javascript/guides/ember/index.mdx index 3db39940d9b1b..66b6551e81310 100644 --- a/src/platforms/javascript/guides/ember/index.mdx +++ b/src/platforms/javascript/guides/ember/index.mdx @@ -10,7 +10,7 @@ On this page, we provide concise information to get you up and running with Sent **Note:** If you don't already have an account and Sentry project established, head over to [sentry.io](https://sentry.io/signup/), then return to this page. -Currently supports all lts versions of Ember 3.x +Our Ember SDK currently supports all lts versions of Ember 3.x. ## Install From 85c9acdefafed26416e8c408483fe7be1cc3b42f Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 8 Sep 2020 12:07:36 -0700 Subject: [PATCH 03/34] Update src/platforms/javascript/guides/ember/ember2.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/platforms/javascript/guides/ember/ember2.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index acbc73883589c..203c9e01e96ca 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -10,7 +10,7 @@ On its own, `@sentry/browser` will report any uncaught exceptions triggered from In order to use ESM imports without any additional configuration, you can use `ember-auto-import` by installing it with `ember install ember-auto-import`. -Starting with version `5.x` our `Ember` integration lives in it's own package `@sentry/integrations`. +Starting with version `5.x` our `Ember` integration lives in its own `@sentry/integrations` package. You can install it with `npm` / `yarn` like: ```bash @@ -61,4 +61,3 @@ like this: ``` - From 12c44b4a3b1cd5dd1104788d99e28a56644ebb3f Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 8 Sep 2020 12:07:44 -0700 Subject: [PATCH 04/34] Update src/platforms/javascript/guides/ember/ember2.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/platforms/javascript/guides/ember/ember2.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index 203c9e01e96ca..fff9ba21f119e 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -7,7 +7,7 @@ redirect_from: To use Sentry with your Ember application, you will need to use Sentry’s browser JavaScript SDK: `@sentry/browser`. On its own, `@sentry/browser` will report any uncaught exceptions triggered from your application. -In order to use ESM imports without any additional configuration, you can use `ember-auto-import` +To use ESM imports without any additional configuration, you can use `ember-auto-import` by installing it with `ember install ember-auto-import`. Starting with version `5.x` our `Ember` integration lives in its own `@sentry/integrations` package. From 1fd586d4576efd3606d93d85206b976092c1f715 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 8 Sep 2020 12:07:51 -0700 Subject: [PATCH 05/34] Update src/platforms/javascript/guides/ember/ember2.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/platforms/javascript/guides/ember/ember2.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index fff9ba21f119e..d7d3774a69b08 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -11,7 +11,7 @@ To use ESM imports without any additional configuration, you can use `ember-auto by installing it with `ember install ember-auto-import`. Starting with version `5.x` our `Ember` integration lives in its own `@sentry/integrations` package. -You can install it with `npm` / `yarn` like: +Install the package using either `npm` or `yarn`: ```bash # Using yarn From 6f238573a910744530543be19f5f6da2b39bb337 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 8 Sep 2020 12:07:58 -0700 Subject: [PATCH 06/34] Update src/platforms/javascript/guides/ember/ember2.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/platforms/javascript/guides/ember/ember2.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index d7d3774a69b08..ce5b1cd32c11a 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -21,7 +21,7 @@ yarn add @sentry/integrations npm install @sentry/integrations ``` -Then add this to your `app.js`: +Then add to your `app.js`: ```javascript import * as Sentry from "@sentry/browser"; From d7cf184d147197b78d8ae499a43cca7773b9090c Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 8 Sep 2020 12:08:05 -0700 Subject: [PATCH 07/34] Update src/platforms/javascript/guides/ember/ember2.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/platforms/javascript/guides/ember/ember2.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index ce5b1cd32c11a..2d04350c93a3e 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -33,7 +33,7 @@ Sentry.init({ }); ``` -In case you are using the CDN version or the Loader, we provide a standalone file for every integration, you can use it +If you are using the CDN version or the Loader, we provide a standalone file for every integration, which you can use as follows: like this: ```html From ad9a4300019039a6405258b2a3cb4099f53449fe Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 8 Sep 2020 12:10:11 -0700 Subject: [PATCH 08/34] Remove extra line from ember2 guide --- src/platforms/javascript/guides/ember/ember2.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index 2d04350c93a3e..ca1de2953c50d 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -34,7 +34,6 @@ Sentry.init({ ``` If you are using the CDN version or the Loader, we provide a standalone file for every integration, which you can use as follows: -like this: ```html From 0e02cd2b81ad057b82ca36f2b719a924a47c7fe6 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 15 Sep 2020 11:35:48 -0700 Subject: [PATCH 09/34] Add performance to docs --- .../javascript/guides/ember/index.mdx | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/index.mdx b/src/platforms/javascript/guides/ember/index.mdx index b7ba88b16cc0e..70ce12dafda79 100644 --- a/src/platforms/javascript/guides/ember/index.mdx +++ b/src/platforms/javascript/guides/ember/index.mdx @@ -56,4 +56,65 @@ Once this is done, all unhandled exceptions are automatically captured by Sentry **Important:** Note your DSN. The _DSN_ (Data Source Name) tells the SDK where to send events. If you forget it, view _Settings -> Projects -> Client Keys (DSN)_ in the Sentry web UI. - + +## Monitor Performance + +Performance Monitoring helps you see everything from macro-level metrics to micro-level spans, and you’ll be able to cross-reference transactions with related issues, customize queries based on your personal needs, and substantially more. + +`@sentry/ember` comes with some performance monitoring enabled by default, sideloading `@sentry/tracing` as a chunk to instrument your application. If you would like to disable performance and no longer receive transactions you can set `disablePerformance` in your config. + +```javascript +ENV['@sentry/ember'] = { + disablePerformance: true +}; +``` + +Performance data is transmitted using a new event type called “transactions”, which you can learn about in [Distributed Tracing](/product/performance/distributed-tracing/). To capture transactions, you must configure your SDK to set the `tracesSampleRate` configuration to a nonzero value. The default configuration will transmit 100% of captured transactions; lower this value in production to avoid consuming your quota too quickly. + +### 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. + +```javascript +import Route from '@ember/routing/route'; +import { instrumentRoutePerformance } from '@sentry/ember'; + +class MyRoute extends Route { + model() { + //... + } +} + +export default instrumentRoutePerformance(SlowLoadingRoute); +``` + +### Classic Components +The render times of classic components are also enabled by default, with a setting to only capture render timings above a certain duration. If you would like to change this minimum you can modify `minimumComponentRenderDuration` in your config. + +```javascript + ENV['@sentry/ember'] = { + minimumComponentRenderDuration: 0, // Setting this to zero will capture all classic components. + }; +``` + +If you would like to disable component instrumentation you can set `disableInstrumentComponents` in your config. +```javascript +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 by `minimumRunloopQueueDuration` in your config. + +```javascript + 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. +```javascript +ENV['@sentry/ember'] = { + disableRunloopPerformance: true +}; +``` From 7ff4c1cb20d3e24514289b0a8363f36013a250a9 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 22 Sep 2020 12:12:15 -0700 Subject: [PATCH 10/34] Add default trace sample rate of 1.0 --- src/platforms/javascript/guides/ember/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platforms/javascript/guides/ember/index.mdx b/src/platforms/javascript/guides/ember/index.mdx index 70ce12dafda79..a0850d892a840 100644 --- a/src/platforms/javascript/guides/ember/index.mdx +++ b/src/platforms/javascript/guides/ember/index.mdx @@ -48,6 +48,7 @@ Then add the following config to your `config/environment.js`: ENV['@sentry/ember'] = { sentry: { dsn: '___PUBLIC_DSN___', + tracesSampleRate: 1.0, // Be sure to lower this in production } }; ``` From 18b1e9cdec4ef277059c58288f0c0638edef2daf Mon Sep 17 00:00:00 2001 From: k-fish Date: Mon, 5 Oct 2020 13:52:58 -0700 Subject: [PATCH 11/34] Update original Ember2 docs with suggestions --- .../javascript/guides/ember/ember2.mdx | 36 ++++--------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index ca1de2953c50d..930029854c284 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -13,12 +13,12 @@ by installing it with `ember install ember-auto-import`. Starting with version `5.x` our `Ember` integration lives in its own `@sentry/integrations` package. Install the package using either `npm` or `yarn`: -```bash -# Using yarn -yarn add @sentry/integrations +```bash {tabTitle:npm} +npm install --save @sentry/integrations +``` -# Using npm -npm install @sentry/integrations +```bash {tabTitle:yarn} +yarn add @sentry/integrations ``` Then add to your `app.js`: @@ -33,30 +33,6 @@ Sentry.init({ }); ``` -If you are using the CDN version or the Loader, we provide a standalone file for every integration, which you can use as follows: - -```html - - - - - - - - -``` +If you are using the CDN version or the Loader, we provide a standalone file for every integration, to set it up [check out our cdn documentation](/platforms/javascript/configuration/install/cdn) From 5d4590a4b701433a9b6b79fb7309417e8a183f4f Mon Sep 17 00:00:00 2001 From: k-fish Date: Mon, 5 Oct 2020 15:08:00 -0700 Subject: [PATCH 12/34] Update Ember docs to the new generic format using includes --- .../javascript.ember.mdx} | 53 ++++++++----------- .../javascript.ember.mdx | 3 ++ .../javascript/guides/ember/config.yml | 6 +++ .../javascript/guides/ember/ember2.mdx | 5 +- 4 files changed, 34 insertions(+), 33 deletions(-) rename src/{platforms/javascript/guides/ember/index.mdx => includes/getting-started-config/javascript.ember.mdx} (58%) create mode 100644 src/includes/getting-started-install/javascript.ember.mdx create mode 100644 src/platforms/javascript/guides/ember/config.yml diff --git a/src/platforms/javascript/guides/ember/index.mdx b/src/includes/getting-started-config/javascript.ember.mdx similarity index 58% rename from src/platforms/javascript/guides/ember/index.mdx rename to src/includes/getting-started-config/javascript.ember.mdx index a0850d892a840..aada3388e827d 100644 --- a/src/platforms/javascript/guides/ember/index.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -1,29 +1,7 @@ ---- -title: Ember -sidebar_order: 3000 -redirect_from: - - /platforms/javascript/ember/ - - /clients/javascript/integrations/ember/ ---- -On this page, we provide concise information to get you up and running with Sentry's Ember SDK, automatically reporting errors and exceptions in your application. +This snippet includes automatic instrumentation to [monitor the performance](/platforms/javascript/performance/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. -**Note:** If you don't already have an account and Sentry project established, head over to [sentry.io](https://sentry.io/signup/), then return to this page. - -Our Ember SDK currently supports all lts versions of Ember 3.x. - -## Install - -Sentry captures data by using an SDK within your application’s runtime. Add the Ember addon using ember-cli: - -```bash {tabTitle:ember-cli} -ember install @sentry/ember -``` - -## Configure - -You should initialize the Sentry Ember SDK as soon as possible during your application load up, before initializing the -application in `app.js`: +**Note:** To reduce the volume of performance data captured, or disable it entirely, change `tracesSampleRate` to a value between 0 and 1 in production. ```javascript import Application from '@ember/application'; @@ -48,7 +26,7 @@ Then add the following config to your `config/environment.js`: ENV['@sentry/ember'] = { sentry: { dsn: '___PUBLIC_DSN___', - tracesSampleRate: 1.0, // Be sure to lower this in production + tracesSampleRate: 1.0, // We recommend adjusting this in production } }; ``` @@ -58,11 +36,22 @@ Once this is done, all unhandled exceptions are automatically captured by Sentry **Important:** Note your DSN. The _DSN_ (Data Source Name) tells the SDK where to send events. If you forget it, view _Settings -> Projects -> Client Keys (DSN)_ in the Sentry web UI. -## Monitor Performance +### Ember Specifics + +The `@sentry/ember` addon comes with some options to manage the Ember specific instrumentation, these options are set on the addon config directly. All Sentry options that would be passed to `init` should be set in the `sentry` key inside your addon config instead. + +```javascript +ENV['@sentry/ember'] = { + // Ember specific options + sentry: { + // Sentry options + } +}; +``` -Performance Monitoring helps you see everything from macro-level metrics to micro-level spans, and you’ll be able to cross-reference transactions with related issues, customize queries based on your personal needs, and substantially more. +### Ember Performance -`@sentry/ember` comes with some performance monitoring enabled by default, sideloading `@sentry/tracing` as a chunk to instrument your application. If you would like to disable performance and no longer receive transactions you can set `disablePerformance` in your config. +The Sentry tracing integration is already setup via the Ember addon with custom Ember instrumentation for routing, components and the runloop. It sideloads `@sentry/tracing` as a chunk to instrument your application. If you would like to disable this automatic instrumentation and no longer receive the associated transactions you can set `disablePerformance` in your config. ```javascript ENV['@sentry/ember'] = { @@ -85,11 +74,11 @@ class MyRoute extends Route { } } -export default instrumentRoutePerformance(SlowLoadingRoute); +export default instrumentRoutePerformance(MyRoute); ``` ### Classic Components -The render times of classic components are also enabled by default, with a setting to only capture render timings above a certain duration. If you would like to change this minimum you can modify `minimumComponentRenderDuration` in your config. +The render times of classic components are also enabled by default, with a setting to only capture render timings only above a certain duration. To change this minimum, you can modify `minimumComponentRenderDuration` in your config. ```javascript ENV['@sentry/ember'] = { @@ -97,7 +86,7 @@ The render times of classic components are also enabled by default, with a setti }; ``` -If you would like to disable component instrumentation you can set `disableInstrumentComponents` in your config. +To disable component instrumentation you can set `disableInstrumentComponents` in your config. ```javascript ENV['@sentry/ember'] = { disableInstrumentComponents: true @@ -105,7 +94,7 @@ ENV['@sentry/ember'] = { ``` ### 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 by `minimumRunloopQueueDuration` in your config. +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` ```javascript ENV['@sentry/ember'] = { diff --git a/src/includes/getting-started-install/javascript.ember.mdx b/src/includes/getting-started-install/javascript.ember.mdx new file mode 100644 index 0000000000000..89515011d2da4 --- /dev/null +++ b/src/includes/getting-started-install/javascript.ember.mdx @@ -0,0 +1,3 @@ +```bash {tabTitle:ember-cli} +ember install @sentry/ember +``` diff --git a/src/platforms/javascript/guides/ember/config.yml b/src/platforms/javascript/guides/ember/config.yml new file mode 100644 index 0000000000000..c903a997a1e24 --- /dev/null +++ b/src/platforms/javascript/guides/ember/config.yml @@ -0,0 +1,6 @@ +title: Ember +categories: + - browser +redirect_from: + - /clients/javascript/integrations/ember/ + - /platforms/javascript/ember/ diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/ember2.mdx index 930029854c284..6896977b27404 100644 --- a/src/platforms/javascript/guides/ember/ember2.mdx +++ b/src/platforms/javascript/guides/ember/ember2.mdx @@ -1,9 +1,12 @@ --- title: Ember 2.x +description: "Learn how to use Sentry's Emberjs integration if you're using Ember 2.x" redirect_from: - /clients/javascript/integrations/ember/ --- +If you're using `Ember 2.x`, you can use Sentry's Ember integration. + To use Sentry with your Ember application, you will need to use Sentry’s browser JavaScript SDK: `@sentry/browser`. On its own, `@sentry/browser` will report any uncaught exceptions triggered from your application. @@ -33,6 +36,6 @@ Sentry.init({ }); ``` -If you are using the CDN version or the Loader, we provide a standalone file for every integration, to set it up [check out our cdn documentation](/platforms/javascript/configuration/install/cdn) +If you are using the CDN version or the Loader, we provide a standalone file for every integration, to set it up [check out our CDN documentation](/platforms/javascript/configuration/install/cdn) From 27625d016962e1d46e2611a2cbf25a7d73569cf4 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 6 Oct 2020 09:13:09 -0700 Subject: [PATCH 13/34] Tweak copy a bit --- src/includes/getting-started-config/javascript.ember.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index aada3388e827d..b9c17c03827ce 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -38,7 +38,7 @@ Once this is done, all unhandled exceptions are automatically captured by Sentry ### Ember Specifics -The `@sentry/ember` addon comes with some options to manage the Ember specific instrumentation, these options are set on the addon config directly. All Sentry options that would be passed to `init` should be set in the `sentry` key inside your addon config instead. +The `@sentry/ember` addon comes with some options to manage the Ember specific instrumentation, these options are set on the addon config directly. All Sentry SDK options that would be passed to `init` should be set in the `sentry` key inside your addon config instead. ```javascript ENV['@sentry/ember'] = { From 5096b24fc196fb903157e19e99201e03b4d93f53 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 6 Oct 2020 10:23:55 -0700 Subject: [PATCH 14/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index b9c17c03827ce..92edb12832806 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -51,7 +51,7 @@ ENV['@sentry/ember'] = { ### Ember Performance -The Sentry tracing integration is already setup via the Ember addon with custom Ember instrumentation for routing, components and the runloop. It sideloads `@sentry/tracing` as a chunk to instrument your application. If you would like to disable this automatic instrumentation and no longer receive the associated transactions you can set `disablePerformance` in your config. +The Sentry tracing integration is already set up via the Ember addon with custom Ember instrumentation for routing, components, and the runloop. It sideloads `@sentry/tracing` as a chunk to instrument your application. If you would like to disable this automatic instrumentation and no longer receive the associated transactions, you can set `disablePerformance` in your config as in this example: ```javascript ENV['@sentry/ember'] = { From ebcb1cd9bf8e96272f7704417bc616949dfdc874 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 6 Oct 2020 10:24:07 -0700 Subject: [PATCH 15/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 92edb12832806..299ec125fbde1 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -78,7 +78,7 @@ export default instrumentRoutePerformance(MyRoute); ``` ### Classic Components -The render times of classic components are also enabled by default, with a setting to only capture render timings only above a certain duration. To change this minimum, you can modify `minimumComponentRenderDuration` in your config. +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. ```javascript ENV['@sentry/ember'] = { From 72acab062c548add301ab7952d975d35b9a40549 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 6 Oct 2020 10:24:15 -0700 Subject: [PATCH 16/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 299ec125fbde1..5051e29809c5d 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -49,7 +49,7 @@ ENV['@sentry/ember'] = { }; ``` -### Ember Performance +### Performance Monitoring Considerations The Sentry tracing integration is already set up via the Ember addon with custom Ember instrumentation for routing, components, and the runloop. It sideloads `@sentry/tracing` as a chunk to instrument your application. If you would like to disable this automatic instrumentation and no longer receive the associated transactions, you can set `disablePerformance` in your config as in this example: From 9a9fb3b1f3ef6d94fe0e1c06ad8d1368e5dd1bb0 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 6 Oct 2020 10:24:23 -0700 Subject: [PATCH 17/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 5051e29809c5d..f9d4afed861c4 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -38,7 +38,7 @@ Once this is done, all unhandled exceptions are automatically captured by Sentry ### Ember Specifics -The `@sentry/ember` addon comes with some options to manage the Ember specific instrumentation, these options are set on the addon config directly. All Sentry SDK options that would be passed to `init` should be set in the `sentry` key inside your addon config instead. +The `@sentry/ember` addon includes options to manage Ember specific instrumentation; these options are set on the addon config directly. All Sentry SDK options that would be passed to `init` should instead be set in the `sentry` key inside your addon config as in this example: ```javascript ENV['@sentry/ember'] = { From f0ca34bd11bde9bc8d8b6ca0edd157a5ffe31cc6 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 6 Oct 2020 10:24:35 -0700 Subject: [PATCH 18/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index f9d4afed861c4..43c49c44439fb 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -1,7 +1,11 @@ This snippet includes automatic instrumentation to [monitor the performance](/platforms/javascript/performance/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. -**Note:** To reduce the volume of performance data captured, or disable it entirely, change `tracesSampleRate` to a value between 0 and 1 in production. + + +To reduce the volume of performance data captured, or disable it entirely, change `tracesSampleRate` to a value between 0 and 1 in production. + + ```javascript import Application from '@ember/application'; From 298afb3a0bd3256453e19ee456771da5e03abb97 Mon Sep 17 00:00:00 2001 From: k-fish Date: Tue, 6 Oct 2020 10:26:41 -0700 Subject: [PATCH 19/34] Remove redundant copy --- src/includes/getting-started-config/javascript.ember.mdx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 43c49c44439fb..aa1fabfff5103 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -37,9 +37,6 @@ ENV['@sentry/ember'] = { Once this is done, all unhandled exceptions are automatically captured by Sentry. -**Important:** Note your DSN. The _DSN_ (Data Source Name) tells the SDK where to send events. If you forget it, view _Settings -> Projects -> Client Keys (DSN)_ in the Sentry web UI. - - ### Ember Specifics The `@sentry/ember` addon includes options to manage Ember specific instrumentation; these options are set on the addon config directly. All Sentry SDK options that would be passed to `init` should instead be set in the `sentry` key inside your addon config as in this example: @@ -63,8 +60,6 @@ ENV['@sentry/ember'] = { }; ``` -Performance data is transmitted using a new event type called “transactions”, which you can learn about in [Distributed Tracing](/product/performance/distributed-tracing/). To capture transactions, you must configure your SDK to set the `tracesSampleRate` configuration to a nonzero value. The default configuration will transmit 100% of captured transactions; lower this value in production to avoid consuming your quota too quickly. - ### 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. From a6313210943ef7de20b298bd60fa05ba8be98058 Mon Sep 17 00:00:00 2001 From: k-fish Date: Wed, 7 Oct 2020 14:56:54 -0700 Subject: [PATCH 20/34] Re-arrange config docs to be on separate pages for clarity, change wizard for Ember as well --- .../config-intro/javascript.ember.mdx | 12 +++ .../javascript.ember.mdx | 87 +++---------------- .../guides/ember/advanced-config.mdx | 59 +++++++++++++ .../javascript/guides/ember/routes.mdx | 20 +++++ src/wizard/javascript/ember.md | 72 ++++++--------- 5 files changed, 129 insertions(+), 121 deletions(-) create mode 100644 src/includes/configuration/config-intro/javascript.ember.mdx create mode 100644 src/platforms/javascript/guides/ember/advanced-config.mdx create mode 100644 src/platforms/javascript/guides/ember/routes.mdx diff --git a/src/includes/configuration/config-intro/javascript.ember.mdx b/src/includes/configuration/config-intro/javascript.ember.mdx new file mode 100644 index 0000000000000..55259ef883002 --- /dev/null +++ b/src/includes/configuration/config-intro/javascript.ember.mdx @@ -0,0 +1,12 @@ +Options are passed to `sentry` inside your environment: + +```javascript +ENV['@sentry/ember'] = { + sentry: { + dsn: '___PUBLIC_DSN___', + tracesSampleRate: 1.0, // We recommend adjusting this in production + maxBreadcrumbs: 50, + debug: true, + } +}; +``` diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index aa1fabfff5103..fdb0652cbc0af 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -1,11 +1,5 @@ -This snippet includes automatic instrumentation to [monitor the performance](/platforms/javascript/performance/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. - - - -To reduce the volume of performance data captured, or disable it entirely, change `tracesSampleRate` to a value between 0 and 1 in production. - - +This snippet includes automatic instrumentation to [monitor the performance](/./advanced-configuration/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. ```javascript import Application from '@ember/application'; @@ -26,84 +20,23 @@ export default class App extends Application { Then add the following config to your `config/environment.js`: -```javascript -ENV['@sentry/ember'] = { - sentry: { - dsn: '___PUBLIC_DSN___', - tracesSampleRate: 1.0, // We recommend adjusting this in production - } -}; -``` - -Once this is done, all unhandled exceptions are automatically captured by Sentry. + + -### Ember Specifics +To reduce the volume of performance data captured, or disable it entirely, change `tracesSampleRate` to a value between 0 and 1 in production. -The `@sentry/ember` addon includes options to manage Ember specific instrumentation; these options are set on the addon config directly. All Sentry SDK options that would be passed to `init` should instead be set in the `sentry` key inside your addon config as in this example: + + ```javascript ENV['@sentry/ember'] = { - // Ember specific options sentry: { - // Sentry options - } -}; -``` - -### Performance Monitoring Considerations - -The Sentry tracing integration is already set up via the Ember addon with custom Ember instrumentation for routing, components, and the runloop. It sideloads `@sentry/tracing` as a chunk to instrument your application. If you would like to disable this automatic instrumentation and no longer receive the associated transactions, you can set `disablePerformance` in your config as in this example: - -```javascript -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. - -```javascript -import Route from '@ember/routing/route'; -import { instrumentRoutePerformance } from '@sentry/ember'; - -class MyRoute extends Route { - model() { - //... + dsn: '___PUBLIC_DSN___', + tracesSampleRate: 1.0, // We recommend adjusting this in production } -} - -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. - -```javascript - 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. -```javascript -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` +Once this is done, all transactions and unhandled exceptions are automatically captured by Sentry. -```javascript - 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. -```javascript -ENV['@sentry/ember'] = { - disableRunloopPerformance: true -}; -``` +This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, to learn more [see the advanced configuration page](./advanced-configuration/) diff --git a/src/platforms/javascript/guides/ember/advanced-config.mdx b/src/platforms/javascript/guides/ember/advanced-config.mdx new file mode 100644 index 0000000000000..a6409124a519a --- /dev/null +++ b/src/platforms/javascript/guides/ember/advanced-config.mdx @@ -0,0 +1,59 @@ +--- +title: Advanced Configuration +description: Additional configuration options for Ember +--- + +The `@sentry/ember` addon includes options to manage Ember specific instrumentation; these options are set on the addon config directly. All Sentry SDK options that would be passed to `init` should instead be set in the `sentry` key inside your addon config as in this example: + +```javascript +ENV['@sentry/ember'] = { + // Ember specific options + sentry: { + // Sentry options + } +}; +``` + +The following documentation is for Ember specific configuration, for Sentry options, [see basic options](./configuration/basic-options) + +### Performance Monitoring Considerations + +The Sentry tracing integration is already set up via the Ember addon with custom Ember instrumentation for routing, components, and the runloop. It sideloads `@sentry/tracing` as a chunk to instrument your application. If you would like to disable this automatic instrumentation and no longer receive the associated transactions, you can set `disablePerformance` in your config as in this example: + +```javascript +ENV['@sentry/ember'] = { + disablePerformance: true +}; +``` + +### 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. + +```javascript + 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. +```javascript +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` + +```javascript + 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. +```javascript +ENV['@sentry/ember'] = { + disableRunloopPerformance: true +}; +``` diff --git a/src/platforms/javascript/guides/ember/routes.mdx b/src/platforms/javascript/guides/ember/routes.mdx new file mode 100644 index 0000000000000..8ff55ae79af93 --- /dev/null +++ b/src/platforms/javascript/guides/ember/routes.mdx @@ -0,0 +1,20 @@ +--- +title: Routes +description: "Learn more about how to track Ember Route performance as part of your transactions." +excerpt: "" +--- + +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. + +```javascript +import Route from '@ember/routing/route'; +import { instrumentRoutePerformance } from '@sentry/ember'; + +class MyRoute extends Route { + model() { + //... + } +} + +export default instrumentRoutePerformance(MyRoute); +``` diff --git a/src/wizard/javascript/ember.md b/src/wizard/javascript/ember.md index c674a0b3fd24d..c61244d3dea02 100644 --- a/src/wizard/javascript/ember.md +++ b/src/wizard/javascript/ember.md @@ -5,60 +5,44 @@ support_level: production type: framework --- -To use Sentry with your Ember application, you will need to use Sentry’s browser JavaScript SDK: `@sentry/browser`. - -On its own, `@sentry/browser` will report any uncaught exceptions triggered from your application. -In order to use ESM imports without any additional configuration, you can use `ember-auto-import` -by installing it with `ember install ember-auto-import`. - -Starting with version `5.x` our `Ember` integration lives in it's own package `@sentry/integrations`. -You can install it with `npm` / `yarn` like: +To use Sentry with your Ember application, you will need to use Sentry’s Ember addon: `@sentry/ember`. ```bash -# Using yarn -yarn add @sentry/browser @sentry/integrations - -# Using npm -npm install --save @sentry/browser @sentry/integrations +# Using ember-cli +ember install @sentry/ember ``` -Then add this to your `app.js`: +You should `init` the Sentry SDK as soon as possible during your application load up in `app.js`, before initializing Ember: ```javascript -import * as Sentry from "@sentry/browser"; -import { Ember as EmberIntegration } from "@sentry/integrations"; +import Application from '@ember/application'; +import Resolver from 'ember-resolver'; +import loadInitializers from 'ember-load-initializers'; +import config from './config/environment'; -Sentry.init({ - dsn: "___PUBLIC_DSN___", - integrations: [new EmberIntegration()], -}); -``` +import { InitSentryForEmber } from '@sentry/ember'; -In case you are using the CDN version or the Loader, we provide a standalone file for every integration, you can use it -like this: +InitSentryForEmber(); -```html - - - +export default class App extends Application { + modulePrefix = config.modulePrefix; + podModulePrefix = config.podModulePrefix; + Resolver = Resolver; +} +``` - - +Then add the following config to your `config/environment.js`: - +```javascript +ENV['@sentry/ember'] = { + sentry: { + dsn: '___PUBLIC_DSN___', + + // We recommend adjusting this value in production, or using tracesSampler + // for finer control + tracesSampleRate: 1.0, + } +}; ``` - +The above configuration captures both error and performance data. To reduce the volume of performance data captured, change `tracesSampleRate` to a value between 0 and 1. From 8ad7f8451244364b9038cabfea63df91c28f0e8b Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 08:51:06 -0700 Subject: [PATCH 21/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index fdb0652cbc0af..ce082dc8c14e5 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -32,7 +32,10 @@ To reduce the volume of performance data captured, or disable it entirely, chang ENV['@sentry/ember'] = { sentry: { dsn: '___PUBLIC_DSN___', - tracesSampleRate: 1.0, // We recommend adjusting this in production + tracesSampleRate: 1.0, + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for performance monitoring. + // We recommend adjusting this value in production, } }; ``` From 637a1e617853cf87ea6f0b8e0b0e7c6d28e935e6 Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 09:30:45 -0700 Subject: [PATCH 22/34] Remove extra line --- src/includes/getting-started-config/javascript.ember.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index ce082dc8c14e5..f93cc455101db 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -40,6 +40,4 @@ ENV['@sentry/ember'] = { }; ``` -Once this is done, all transactions and unhandled exceptions are automatically captured by Sentry. - This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, to learn more [see the advanced configuration page](./advanced-configuration/) From 2240aa475e7803a3bf947365b0fd68eab8f04159 Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 10:22:35 -0700 Subject: [PATCH 23/34] Rearrange so all options are under configuration --- .../javascript.ember.mdx | 10 +++++++-- .../ember-options.mdx} | 22 +++++++++++++++++-- .../other-versions}/ember2.mdx | 0 .../configuration/other-versions/index.mdx | 6 +++++ .../javascript/guides/ember/routes.mdx | 20 ----------------- 5 files changed, 34 insertions(+), 24 deletions(-) rename src/platforms/javascript/guides/ember/{advanced-config.mdx => configuration/ember-options.mdx} (77%) rename src/platforms/javascript/guides/ember/{ => configuration/other-versions}/ember2.mdx (100%) create mode 100644 src/platforms/javascript/guides/ember/configuration/other-versions/index.mdx delete mode 100644 src/platforms/javascript/guides/ember/routes.mdx diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index f93cc455101db..9322bfe9d11dd 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -32,12 +32,18 @@ To reduce the volume of performance data captured, or disable it entirely, chang ENV['@sentry/ember'] = { sentry: { dsn: '___PUBLIC_DSN___', - tracesSampleRate: 1.0, + // Set tracesSampleRate to 1.0 to capture 100% // of transactions for performance monitoring. // We recommend adjusting this value in production, + tracesSampleRate: 1.0, } }; ``` -This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, to learn more [see the advanced configuration page](./advanced-configuration/) + + +This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, this additional configuration can be found under +integration configuration. + + diff --git a/src/platforms/javascript/guides/ember/advanced-config.mdx b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx similarity index 77% rename from src/platforms/javascript/guides/ember/advanced-config.mdx rename to src/platforms/javascript/guides/ember/configuration/ember-options.mdx index a6409124a519a..3261c492a17d6 100644 --- a/src/platforms/javascript/guides/ember/advanced-config.mdx +++ b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx @@ -1,6 +1,7 @@ --- -title: Advanced Configuration -description: Additional configuration options for Ember +title: Ember Options +description: Additional configuration options for the Ember addon +sidebar_order: 1 --- The `@sentry/ember` addon includes options to manage Ember specific instrumentation; these options are set on the addon config directly. All Sentry SDK options that would be passed to `init` should instead be set in the `sentry` key inside your addon config as in this example: @@ -26,6 +27,23 @@ ENV['@sentry/ember'] = { }; ``` +### 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. + +```javascript +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. diff --git a/src/platforms/javascript/guides/ember/ember2.mdx b/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx similarity index 100% rename from src/platforms/javascript/guides/ember/ember2.mdx rename to src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx diff --git a/src/platforms/javascript/guides/ember/configuration/other-versions/index.mdx b/src/platforms/javascript/guides/ember/configuration/other-versions/index.mdx new file mode 100644 index 0000000000000..8cfa7f54ecbd6 --- /dev/null +++ b/src/platforms/javascript/guides/ember/configuration/other-versions/index.mdx @@ -0,0 +1,6 @@ +--- +title: Other Versions +sidebar_order: 2 +--- + + diff --git a/src/platforms/javascript/guides/ember/routes.mdx b/src/platforms/javascript/guides/ember/routes.mdx deleted file mode 100644 index 8ff55ae79af93..0000000000000 --- a/src/platforms/javascript/guides/ember/routes.mdx +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: Routes -description: "Learn more about how to track Ember Route performance as part of your transactions." -excerpt: "" ---- - -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. - -```javascript -import Route from '@ember/routing/route'; -import { instrumentRoutePerformance } from '@sentry/ember'; - -class MyRoute extends Route { - model() { - //... - } -} - -export default instrumentRoutePerformance(MyRoute); -``` From 5ad2609a0ccc578c2b5222043cda813e4fab1e8a Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 10:32:14 -0700 Subject: [PATCH 24/34] Adjust primer to include that 'transactions' are captured as well --- src/includes/getting-started-primer/javascript.ember.mdx | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/includes/getting-started-primer/javascript.ember.mdx diff --git a/src/includes/getting-started-primer/javascript.ember.mdx b/src/includes/getting-started-primer/javascript.ember.mdx new file mode 100644 index 0000000000000..21bdfc2df852a --- /dev/null +++ b/src/includes/getting-started-primer/javascript.ember.mdx @@ -0,0 +1,7 @@ + + + +_Sentry's Ember addon enables automatic reporting of errors, exceptions and transactions._ + + + From a9f02a5c9344570cc44ac00b6aeeac395339c16f Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 10:46:17 -0700 Subject: [PATCH 25/34] Fix links --- src/includes/getting-started-config/javascript.ember.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 9322bfe9d11dd..f91b5f3de76e2 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -1,5 +1,5 @@ -This snippet includes automatic instrumentation to [monitor the performance](/./advanced-configuration/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. +This snippet includes automatic instrumentation to [monitor the performance](/./configuration/ember-options/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. ```javascript import Application from '@ember/application'; @@ -44,6 +44,6 @@ ENV['@sentry/ember'] = { This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, this additional configuration can be found under -integration configuration. +Ember options. From 814bff04c490d75755dbda34e5f547662fe80cfa Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 10:58:26 -0700 Subject: [PATCH 26/34] Fix links --- src/includes/getting-started-config/javascript.ember.mdx | 2 +- .../javascript/guides/ember/configuration/ember-options.mdx | 2 +- .../guides/ember/configuration/other-versions/ember2.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index f91b5f3de76e2..706539714ec49 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -44,6 +44,6 @@ ENV['@sentry/ember'] = { This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, this additional configuration can be found under -Ember options. +Ember options. diff --git a/src/platforms/javascript/guides/ember/configuration/ember-options.mdx b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx index 3261c492a17d6..4952f14b33c2a 100644 --- a/src/platforms/javascript/guides/ember/configuration/ember-options.mdx +++ b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx @@ -15,7 +15,7 @@ ENV['@sentry/ember'] = { }; ``` -The following documentation is for Ember specific configuration, for Sentry options, [see basic options](./configuration/basic-options) +The following documentation is for Ember specific configuration, for Sentry options, [see basic options](/platforms/javascript/guides/ember/configuration/basic-options) ### Performance Monitoring Considerations diff --git a/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx b/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx index 6896977b27404..92e45ac8798c8 100644 --- a/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx +++ b/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx @@ -36,6 +36,6 @@ Sentry.init({ }); ``` -If you are using the CDN version or the Loader, we provide a standalone file for every integration, to set it up [check out our CDN documentation](/platforms/javascript/configuration/install/cdn) +If you are using the CDN version or the Loader, we provide a standalone file for every integration, to set it up [check out our CDN documentation](/platforms/javascript/install/cdn) From ee2f7b9aa7531f9aba9fcf7ce1966187ef36e325 Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 11:09:00 -0700 Subject: [PATCH 27/34] Fix links (actually) --- src/includes/getting-started-config/javascript.ember.mdx | 4 ++-- .../javascript/guides/ember/configuration/ember-options.mdx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 706539714ec49..72211d40e7546 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -1,5 +1,5 @@ -This snippet includes automatic instrumentation to [monitor the performance](/./configuration/ember-options/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. +This snippet includes automatic instrumentation to [monitor the performance](./configuration/ember-options/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. ```javascript import Application from '@ember/application'; @@ -44,6 +44,6 @@ ENV['@sentry/ember'] = { This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, this additional configuration can be found under -Ember options. +Ember options. diff --git a/src/platforms/javascript/guides/ember/configuration/ember-options.mdx b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx index 4952f14b33c2a..dd0b48341b1fd 100644 --- a/src/platforms/javascript/guides/ember/configuration/ember-options.mdx +++ b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx @@ -15,7 +15,7 @@ ENV['@sentry/ember'] = { }; ``` -The following documentation is for Ember specific configuration, for Sentry options, [see basic options](/platforms/javascript/guides/ember/configuration/basic-options) +The following documentation is for Ember specific configuration, for Sentry options, [see basic options](/platforms/javascript/guides/ember/configuration/options) ### Performance Monitoring Considerations From 7f91ca4081a3ee61a29e1c8fbc3ad32228bd0dd2 Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 14:46:26 -0700 Subject: [PATCH 28/34] Update src/includes/getting-started-primer/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-primer/javascript.ember.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/getting-started-primer/javascript.ember.mdx b/src/includes/getting-started-primer/javascript.ember.mdx index 21bdfc2df852a..804ee1b6317e2 100644 --- a/src/includes/getting-started-primer/javascript.ember.mdx +++ b/src/includes/getting-started-primer/javascript.ember.mdx @@ -1,7 +1,7 @@ -_Sentry's Ember addon enables automatic reporting of errors, exceptions and transactions._ +_Sentry's Ember addon enables automatic reporting of errors, exceptions, and transactions._ From 574e7973eadd044e1cdd80f986369e2348c632db Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 14:46:36 -0700 Subject: [PATCH 29/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 72211d40e7546..2ffff28b35686 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -43,7 +43,6 @@ ENV['@sentry/ember'] = { -This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, this additional configuration can be found under -Ember options. +This SDK uses Ember configuration conventions to manage its automatic instrumentation and other Sentry options, this additional configuration can be found under Ember options. From 4fbae13d78f59aad15b7e9b38ee5073283da887b Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 14:46:46 -0700 Subject: [PATCH 30/34] Update src/includes/getting-started-config/javascript.ember.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/includes/getting-started-config/javascript.ember.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index 2ffff28b35686..dbe6647309efe 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -1,5 +1,5 @@ -This snippet includes automatic instrumentation to [monitor the performance](./configuration/ember-options/) of your application, which registers and configures the Tracing integration, including custom Ember instrumentation. +This snippet includes automatic instrumentation to monitor the performance of your application, which registers and configures the Tracing integration, including custom [Ember instrumentation](./configuration/ember-options/). ```javascript import Application from '@ember/application'; From 0fc06f408d03735144111a543992e1bd3e0c30da Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 14:46:57 -0700 Subject: [PATCH 31/34] Update src/platforms/javascript/guides/ember/configuration/ember-options.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- .../javascript/guides/ember/configuration/ember-options.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/configuration/ember-options.mdx b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx index dd0b48341b1fd..ee04045d7cac5 100644 --- a/src/platforms/javascript/guides/ember/configuration/ember-options.mdx +++ b/src/platforms/javascript/guides/ember/configuration/ember-options.mdx @@ -1,6 +1,6 @@ --- title: Ember Options -description: Additional configuration options for the Ember addon +description: "Additional configuration options for the Ember addon." sidebar_order: 1 --- From b8e57a11987ebaaf6c017634f85f2115a4ba170a Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 14:47:06 -0700 Subject: [PATCH 32/34] Update src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- .../guides/ember/configuration/other-versions/ember2.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx b/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx index 92e45ac8798c8..8b38a9abf1f0e 100644 --- a/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx +++ b/src/platforms/javascript/guides/ember/configuration/other-versions/ember2.mdx @@ -1,6 +1,6 @@ --- title: Ember 2.x -description: "Learn how to use Sentry's Emberjs integration if you're using Ember 2.x" +description: "Learn how to use Sentry's Emberjs integration if you're using Ember 2.x." redirect_from: - /clients/javascript/integrations/ember/ --- From c3ae6291552c4cd83d55d424dd16b261773ce26c Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 14:47:16 -0700 Subject: [PATCH 33/34] Update src/wizard/javascript/ember.md Co-authored-by: Fiona <61481573+PeloWriter@users.noreply.github.com> --- src/wizard/javascript/ember.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wizard/javascript/ember.md b/src/wizard/javascript/ember.md index c61244d3dea02..bb7d894c5b33d 100644 --- a/src/wizard/javascript/ember.md +++ b/src/wizard/javascript/ember.md @@ -38,6 +38,8 @@ ENV['@sentry/ember'] = { sentry: { dsn: '___PUBLIC_DSN___', + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for performance monitoring. // We recommend adjusting this value in production, or using tracesSampler // for finer control tracesSampleRate: 1.0, From 4687e96c79d36191d9dac79a652f792ef3dbf7ff Mon Sep 17 00:00:00 2001 From: k-fish Date: Thu, 8 Oct 2020 14:49:11 -0700 Subject: [PATCH 34/34] Delete extra note: --- src/includes/getting-started-config/javascript.ember.mdx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/includes/getting-started-config/javascript.ember.mdx b/src/includes/getting-started-config/javascript.ember.mdx index dbe6647309efe..c50693d47e885 100644 --- a/src/includes/getting-started-config/javascript.ember.mdx +++ b/src/includes/getting-started-config/javascript.ember.mdx @@ -20,14 +20,6 @@ export default class App extends Application { Then add the following config to your `config/environment.js`: - - - -To reduce the volume of performance data captured, or disable it entirely, change `tracesSampleRate` to a value between 0 and 1 in production. - - - - ```javascript ENV['@sentry/ember'] = { sentry: {