Add new setting for performance tracing sample rate
Background
In !114281 (closed) we have a POC which shows how the performance tracing of Sentry works.
The payloads for performance analysis are large, and a sampling rate can be defined on the client.
Problem Statement
This feature cannot be enabled directly as adjusting the sampling rate on the fly is very important for the reliability of our Sentry instance.
Our setting at /admin/application_settings/metrics_and_profiling
require a restart to work.
Proposed Solution
Two changes are needed for our performance tracking to be possible:
- Settings should be updated without requiring a restart
- A new
application_setting_sentry_clientside_traces_sample_rate
setting should be added to our settings.
MRs that implement this solution
MR | Description |
---|---|
!128336 (merged) | Add sentry_clientside_traces_sample_rate app setting |
!130144 (merged) | Add sentry_clientside_traces_sample_rate setting to gon |
!130147 (merged) | Make sentry_clientside_traces_sample_rate configurable via admin panel |
Conclusion
With the MRs all merged, we've achieved the goal of this issue:
- To edit the new setting:
- Make sure the Feature Flag
configure_sentry_in_application_settings
is enabled - Go to admin panel
/admin/application_settings/metrics_and_profiling
- In the
Sentry
section, edit theClientside traces sample rate
field - Click
Save changes
button after editing. - A full page reload will give the success/rejection save message
- Make sure the Feature Flag
- To use the new setting:
- Make sure the Feature Flag
enable_new_sentry_clientside_integration
is enabled andGitlab::CurrentSettings.sentry_enabled
istrue
- In the frontend check the value of
window.gon.sentry_clientside_traces_sample_rate
- Make sure the Feature Flag
Edited by Sheldon Led