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
Copy file name to clipboardExpand all lines: README.md
+33-26Lines changed: 33 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,33 +36,11 @@ ENV.sentry {
36
36
```
37
37
- Integrate [raven-js][2] in your page
38
38
39
-
By default a meta tag with the key name `sentry:revision` is inserted in your index.html, like so
40
-
```html
41
-
<metaname="sentry:revision"content="(revision)">
42
-
```
39
+
Install [ember-cli-sentry](https://github.com/damiencaselli/ember-cli-sentry) but import the raven service from `ember-cli-deploy-sentry/service/raven`,
40
+
which will automatically handle setting up the release version for you. Sentry needs this to find the correct sourcemap for an error that occurs.
43
41
44
-
Disabling this behavior is done by configuring in `deploy.js`:
45
-
```javascript
46
-
ENV.sentry {
47
-
// ... other config options
48
-
enableRevisionTagging:false
49
-
}
50
-
```
42
+
If you don't want to use `ember-cli-sentry` but set [raven-js][2] up manually see [Manual integration with raven-js](#manual-integration-with-raven-js).
51
43
52
-
When you setup [raven-js][2] you can retrieve it like so:
Last but not least make sure to setup proper exception catching like [this](https://github.com/getsentry/raven-js/blob/master/plugins/ember.js).
61
-
62
-
63
-
Also, [ember-cli-sentry](https://github.com/damiencaselli/ember-cli-sentry) is useful to get started quickly. (It also sets up the exception handlers for you)
64
-
For it to work you will need to set `revisionKey` to your application's `config.APP.version` or set [raven-js][2]'s `release` option later via
65
-
`Raven.setReleaseContext($("meta[name='sentry:revision']").attr('content'))`. Doing this automatically
66
44
67
45
- Build sourcemaps in production environment
68
46
@@ -179,22 +157,51 @@ The revision string that is used to create releases in sentry.
179
157
}
180
158
```
181
159
160
+
### enableRevisionTagging
161
+
162
+
Enable adding a meta tag with the current revisionKey into the head of your `index.html`.
163
+
164
+
*Default* true
165
+
182
166
## Prerequisites
183
167
184
168
The following properties are expected to be present on the deployment `context` object:
185
169
186
170
-`distDir` (provided by [ember-cli-deploy-build][11])
187
171
-`revisionData.revisionKey` (provided by [ember-cli-deploy-revision-data][12])
188
172
173
+
174
+
## Manual integration with raven-js
175
+
176
+
By default a meta tag with the key name `sentry:revision` is inserted in your index.html:
177
+
```html
178
+
<metaname="sentry:revision"content="(revision)">
179
+
180
+
```
181
+
182
+
When you setup [raven-js][2] you can retrieve it like this:
If you only want to use the sourcemap upload functionality of `ember-cli-deploy-sentry`, you can disable automatic meta tag insertion completely by setting [enableRevisionTagging](#enableRevisionTagging) to `false`.
191
+
192
+
193
+
Last but not least make sure to setup proper exception catching like [this](https://github.com/getsentry/raven-js/blob/master/plugins/ember.js).
194
+
189
195
## Running Tests
190
196
191
197
-`npm test`
192
198
193
199
## TODO
194
200
195
-
- Tests ... right?
196
201
- use `context.distFiles` from [ember-cli-deploy-build][11] instead globbing distDir again?
197
202
- automatically setup raven-js? If you want this, let me know.
203
+
- add revision tagging file pattern
204
+
- make meta name configurable and document `service.releaseMetaName`
0 commit comments