Make `sentry_clientside_traces_sample_rate` configurable via admin panel
What does this MR do and why?
As part of #407169 (closed) we want to expose sentry_clientside_traces_sample_rate
to be configurable via admin panel, so we can configure Sentry's client side trances sample rate on the fly (PoC in !114281 (closed)). The sample rate is a value between 0
and 1
. So we added:
- Frontend validation with
min: 0, max: 1, step: 0.001
- Backend validation (in the DB, code !128336 (merged))
Screenshots or screen recordings
Before | After | Backend Validation |
---|---|---|
How to set up and validate locally
- Make sure to enable:
Feature.enable(:configure_sentry_in_application_settings)
- In the browser
- Login as
root
or any admin user, in your localGDK
. - Go to this Admin Page: https://gdk.test:3443/admin/application_settings/metrics_and_profiling
- Update the value
- Login as
- Go to
rails console
- Check the value has been updated:
Gitlab::CurrentSettings.sentry_clientside_traces_sample_rate
- Check the value has been updated:
- Alternativelly, apply the change in !130144 (merged) to your local GDK and check
gon.sentry_clientside_traces_sample_rate
in the browser dev tools
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Miguel Rincon