Skip to content

Add sentry_clientside_traces_sample_rate setting to gon

Sheldon Led requested to merge led/407169-make-new-setting-available-in-gon into master

What does this MR do and why?

As part of #407169 (closed) in order to make our configuration available in sentry config on the frontend (PoC in !114281 (closed)) we need to expose sentry_clientside_traces_sample_rate in gon.

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Make sure to Feature.enable(:enable_new_sentry_clientside_integration)
  2. Open any page of your local GDK in the browser
    1. Open the browser dev tools
    2. Check the value of gon.sentry_clientside_traces_sample_rate
  3. Open rails console
    1. Set a number to this setting Gitlab::CurrentSettings.update(sentry_clientside_traces_sample_rate: 0.5)
  4. Back to the browser
    1. Refresh the page
    2. Check the value of gon.sentry_clientside_traces_sample_rate again
    3. Make sure it's the new value you've set in rails console

MR acceptance checklist

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

Edited by Sheldon Led

Merge request reports