Skip to content

Update release and version in Sentry frontend

What does this MR do and why?

Fixes: #429031 (closed).

According to Sentry's documentation a release is a "version of your code deployed to an environment". As gitlab.com is the source of errors for our sentry, we should use "gon.revision" as releases.

This is important if we wish to integrate js sourcemaps to our workflow, as sourcemaps artifacts will be assigned a release name that must match the git revision in Sentry.

Note: This is a correction of the work at: !120752 (merged), it became more clear that this fix was needed when I uploaded source maps to sentry at !134893 (comment 1616030387), and the release names didn't match.

Screenshots or screen recordings

Screenshot_2023-10-24_at_09.22.22

How to set up and validate locally

We can test this by enabling the

  1. Use the following mock configuration in metrics and profiling: http://gdk.test:3000/admin/application_settings/metrics_and_profiling#js-sentry-settings
Click to expand image
  1. Inspect the following values in the browser console:
__SENTRY__.hub._stack[0].scope._session.release
__SENTRY__.hub._stack[0].scope._tags.version

image

  1. Remember to disable your Sentry locally!

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #429031 (closed)

Edited by Miguel Rincon

Merge request reports