Skip to content

Commit ca951a3

Browse files
committed
add some documentation for the revision tagging
1 parent f217035 commit ca951a3

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,33 @@ ENV.sentry {
3636
```
3737
- Integrate [raven-js][2] in your page
3838

39-
It's important to initialize the client with `release` as the `revisionKey`.
40-
You will probably need to either write the `revisionKey` into your `index.html` file at build time or when serving it.
41-
42-
For example add this to your `index.html` and dynamically replace the `$REVISION` string with `revisionKey`:
39+
By default a meta tag with the key name `sentry:revision` is inserted in your index.html, like so
4340
```html
44-
<meta name="revision" content="$REVISION">
41+
<meta name="sentry:revision" content="(revision)">
42+
```
43+
44+
Disabling this behavior is done by configuring in `deploy.js`:
45+
```javascript
46+
ENV.sentry {
47+
// ... other config options
48+
disableRevisionTagging: true
49+
}
4550
```
4651

47-
Then when you setup [raven-js][2] you can retrieve it like so:
52+
When you setup [raven-js][2] you can retrieve it like so:
4853

4954
```javascript
5055
Raven.config({
51-
release: $("meta[name='revision']").attr('content')
56+
release: $("meta[name='sentry:revision']").attr('content')
5257
});
5358
```
5459

5560
Last but not least make sure to setup proper exception catching like [this](https://github.com/getsentry/raven-js/blob/master/plugins/ember.js).
5661

5762

58-
We don't use it (yet), but [ember-cli-sentry](https://github.com/damiencaselli/ember-cli-sentry) is probably useful to get started quickly. (It also sets up the exception handlers for you)
59-
Apparently 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
60-
`Raven.setReleaseContext($("meta[name='revision']").attr('content'))`.
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
6166

6267
- Build sourcemaps in production environment
6368

0 commit comments

Comments
 (0)