You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aside from configuration passed from this addon into `@sentry/browser` via the `sentry` property, there is also the following Ember specific configuration.
57
+
Aside from configuration passed from this addon into `@sentry/browser` via the `sentry` property, there is also the following Ember specific configuration:
58
58
59
59
```javascript
60
-
ENV['@sentry/ember'] = {
61
-
ignoreEmberOnErrorWarning:false, // Will silence Ember.onError warning without the need of using Ember debugging tools. False by default.
62
-
sentry:...// See sentry-javascript configuration https://docs.sentry.io/error-reporting/configuration/?platform=javascript
63
-
};
60
+
ENV['@sentry/ember'] = {
61
+
// Will silence Ember.onError warning without the need of using Ember debugging tools.
62
+
ignoreEmberOnErrorWarning:false,
63
+
64
+
// Will disable automatic instrumentation of performance.
65
+
// Manual instrumentation will still be sent.
66
+
disablePerformance:true,
67
+
68
+
// All runloop queue durations will be added as spans.
69
+
minimumRunloopQueueDuration:0,
70
+
71
+
// Will disable automatic instrumentation for components.
72
+
disableInstrumentComponents:true,
73
+
74
+
// All (non-glimmer) component render durations will be added as spans.
75
+
minimumComponentRenderDuration:0,
76
+
77
+
// All component definitions will be added as spans.
78
+
enableComponentDefinition:true,
79
+
80
+
// See sentry-javascript configuration https://docs.sentry.io/error-reporting/configuration/?platform=javascript
81
+
sentry: {}
82
+
};
83
+
```
84
+
85
+
You can also pass additional configuration for sentry-javascript directly to the `InitSentryForEmber` method.
86
+
This configuration will be merged with `ENV['@sentry/ember'].sentry`:
87
+
88
+
```javascript
89
+
InitSentryForEmber({
90
+
ignoreErrors: [
91
+
/You appear to be offline/,
92
+
],
93
+
})
64
94
```
65
95
96
+
It is recommended to pass all static sentry-javascript configuration directly to `InitSentryForEmber`, and only keeping configuration that depends on the build environment/secrets in `config/environment.js`. Please note that due to how the environment config is serialized, any non-JSON-serializable config (like a regex) will not work properly when being kept in `config/environment.js`.
97
+
66
98
#### Disabling Performance
67
99
68
100
`@sentry/ember` captures performance by default, if you would like to disable the automatic performance instrumentation, you can add the following to your `config/environment.js`:
69
101
70
102
```javascript
71
-
ENV['@sentry/ember'] = {
72
-
disablePerformance:true, // Will disable automatic instrumentation of performance. Manual instrumentation will still be sent.
73
-
sentry:...// See sentry-javascript configuration https://docs.sentry.io/error-reporting/configuration/?platform=javascript
74
-
};
103
+
ENV['@sentry/ember'] = {
104
+
disablePerformance:true, // Will disable automatic instrumentation of performance. Manual instrumentation will still be sent.
105
+
};
75
106
```
76
107
77
108
@@ -100,37 +131,37 @@ such as when using glimmer components.
100
131
101
132
If you would like to change the runloop queue threshold, add the following to your config:
102
133
```javascript
103
-
ENV['@sentry/ember'] = {
104
-
minimumRunloopQueueDuration:0, // All runloop queue durations will be added as spans.
105
-
};
134
+
ENV['@sentry/ember'] = {
135
+
minimumRunloopQueueDuration:0, // All runloop queue durations will be added as spans.
136
+
};
106
137
```
107
138
108
139
#### Components
109
140
Non-glimmer component render times will automatically get captured.
110
141
111
142
If you would like to disable component render being instrumented, add the following to your config:
112
143
```javascript
113
-
ENV['@sentry/ember'] = {
114
-
disableInstrumentComponents:true, // Will disable automatic instrumentation for components.
115
-
};
144
+
ENV['@sentry/ember'] = {
145
+
disableInstrumentComponents:true, // Will disable automatic instrumentation for components.
146
+
};
116
147
```
117
148
118
149
Additionally, components whose render time is below a threshold (by default 2ms) will not be included as spans.
119
150
If you would like to change this threshold, add the following to your config:
120
151
```javascript
121
-
ENV['@sentry/ember'] = {
122
-
minimumComponentRenderDuration:0, // All (non-glimmer) component render durations will be added as spans.
123
-
};
152
+
ENV['@sentry/ember'] = {
153
+
minimumComponentRenderDuration:0, // All (non-glimmer) component render durations will be added as spans.
154
+
};
124
155
```
125
156
126
157
#### Glimmer components
127
158
Currently glimmer component render durations can only be captured indirectly via the runloop instrumentation. You can
128
159
optionally enable a setting to show component definitions (which will indicate which components are being rendered) be
129
160
adding the following to your config:
130
161
```javascript
131
-
ENV['@sentry/ember'] = {
132
-
enableComponentDefinition:true, // All component definitions will be added as spans.
133
-
};
162
+
ENV['@sentry/ember'] = {
163
+
enableComponentDefinition:true, // All component definitions will be added as spans.
0 commit comments