Sentry frontend release and version review
Description
According to Sentry's documentation a release is a "version of your code deployed to an environment". https://docs.sentry.io/product/releases/
We are currently using release: gon.version
which is not appropiate for our .com
releases: As the version string is does not point to an exact release in gitlab.com. As gitlab.com the source of errors for sentry, we would be better served by using our "revision".
We should move to using gon.revision
(as done in the rails project), and use the version
as a simple tag:
diff --git a/app/assets/javascripts/sentry/init_sentry.js b/app/assets/javascripts/sentry/init_sentry.js
index 4a38455d01f0..722741b50e46 100644
--- a/app/assets/javascripts/sentry/init_sentry.js
+++ b/app/assets/javascripts/sentry/init_sentry.js
@@ -23,7 +23,7 @@ const initSentry = () => {
const client = new BrowserClient({
// Sentry.init(...) options
dsn: gon.sentry_dsn,
- release: gon.version,
+ release: gon.revision,
allowUrls:
process.env.NODE_ENV === 'production'
? [gon.gitlab_url]
@@ -56,7 +56,7 @@ const initSentry = () => {
hub.bindClient(client);
hub.setTags({
- revision: gon.revision,
+ version: gon.version,
feature_category: gon.feature_category,
page,
});