diff --git a/app/views/admin/application_settings/_sentry.html.haml b/app/views/admin/application_settings/_sentry.html.haml index 962672376771bbed40030e9dc94fe44e1695e1b8..5079f374c84e5d7e33ef659baa2956c074f832e0 100644 --- a/app/views/admin/application_settings/_sentry.html.haml +++ b/app/views/admin/application_settings/_sentry.html.haml @@ -1,9 +1,9 @@ = gitlab_ui_form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-sentry-settings'), html: { class: 'fieldset-form', id: 'sentry-settings' } do |f| = form_errors(@application_setting) - - if Feature.disabled?(:enable_new_sentry_integration) || Feature.disabled?(:enable_new_sentry_clientside_integration, current_user) + - if Feature.disabled?(:enable_new_sentry_integration) %fieldset.gl-text-secondary - = safe_format(s_('AdminSettings|GitLab uses the %{bold_start}Rails%{bold_end} and %{bold_start}Browser JavaScript%{bold_end} Sentry SDKs to send events to Sentry. For changes to Rails integration settings to take effect, enable the %{code_start}enable_new_sentry_integration%{code_end} and %{code_start}enable_new_sentry_clientside_integration%{code_end} feature flags and restart GitLab.'), tag_pair(tag.b, :bold_start, :bold_end), tag_pair(tag.code, :code_start, :code_end)) + = safe_format(s_('AdminSettings|GitLab uses the %{bold_start}Rails%{bold_end} and %{bold_start}Browser JavaScript%{bold_end} Sentry SDKs to send events to Sentry. For changes to Rails integration settings to take effect, enable the %{code_start}enable_new_sentry_integration%{code_end} feature flag and restart GitLab.'), tag_pair(tag.b, :bold_start, :bold_end), tag_pair(tag.code, :code_start, :code_end)) - else %fieldset.gl-text-secondary = safe_format(s_('AdminSettings|GitLab uses the %{bold_start}Rails%{bold_end} and %{bold_start}Browser JavaScript%{bold_end} Sentry SDKs to send events to Sentry. For changes to Rails integration settings to take effect, restart GitLab.'), tag_pair(tag.b, :bold_start, :bold_end)) diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 54985651cc79efb05ecb203631c819c1b34fcd82..ecf9556978c7bc6fd0076fdf8ca15453d6a157da 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -48,7 +48,7 @@ = render 'layouts/loading_hints' = render_if_exists 'layouts/header/translations' - - if Feature.enabled?(:enable_new_sentry_clientside_integration, current_user) && Gitlab::CurrentSettings.sentry_enabled + - if Feature.enabled?(:enable_new_sentry_integration) && Gitlab::CurrentSettings.sentry_enabled = webpack_bundle_tag 'sentry' - elsif Gitlab.config.sentry.enabled = webpack_bundle_tag 'legacy_sentry' diff --git a/config/feature_flags/development/enable_new_sentry_clientside_integration.yml b/config/feature_flags/development/enable_new_sentry_clientside_integration.yml deleted file mode 100644 index 46835315f2f1a35a674ccdef7e12d8e798229b72..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/enable_new_sentry_clientside_integration.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: enable_new_sentry_clientside_integration -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102650 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/382570 -milestone: '15.6' -type: development -group: group::runner -default_enabled: false diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index f50a6747497eb33f332bcc3e071c73a3f2957075..6fdbfd833fad4d4635468ced2f29d8cf8e214a0d 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -25,10 +25,9 @@ def add_gon_variables gon.sentry_environment = Gitlab.config.sentry.environment end - # Support for Sentry setup via configuration files will be removed in 16.0 + # Support for Sentry setup via configuration files will be removed in 17.0 # in favor of Gitlab::CurrentSettings. - if Feature.enabled?(:enable_new_sentry_clientside_integration, - current_user) && Gitlab::CurrentSettings.sentry_enabled + if Feature.enabled?(:enable_new_sentry_integration) && Gitlab::CurrentSettings.sentry_enabled gon.sentry_dsn = Gitlab::CurrentSettings.sentry_clientside_dsn gon.sentry_environment = Gitlab::CurrentSettings.sentry_environment gon.sentry_clientside_traces_sample_rate = Gitlab::CurrentSettings.sentry_clientside_traces_sample_rate diff --git a/locale/gitlab.pot b/locale/gitlab.pot index d5ab5389916fa31a4a60fb8c8c2ccfa53dc31bbe..a622aff16e282c4cafe7436ba609568281f45bce 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3529,7 +3529,7 @@ msgstr "" msgid "AdminSettings|Git abuse rate limit" msgstr "" -msgid "AdminSettings|GitLab uses the %{bold_start}Rails%{bold_end} and %{bold_start}Browser JavaScript%{bold_end} Sentry SDKs to send events to Sentry. For changes to Rails integration settings to take effect, enable the %{code_start}enable_new_sentry_integration%{code_end} and %{code_start}enable_new_sentry_clientside_integration%{code_end} feature flags and restart GitLab." +msgid "AdminSettings|GitLab uses the %{bold_start}Rails%{bold_end} and %{bold_start}Browser JavaScript%{bold_end} Sentry SDKs to send events to Sentry. For changes to Rails integration settings to take effect, enable the %{code_start}enable_new_sentry_integration%{code_end} feature flag and restart GitLab." msgstr "" msgid "AdminSettings|GitLab uses the %{bold_start}Rails%{bold_end} and %{bold_start}Browser JavaScript%{bold_end} Sentry SDKs to send events to Sentry. For changes to Rails integration settings to take effect, restart GitLab." diff --git a/spec/features/sentry_js_spec.rb b/spec/features/sentry_js_spec.rb index 0cf32864b1e337d59c574cb5150adf2b66d6f7c4..583dcba62208c779bf747ae535b50a3cc1baf4a0 100644 --- a/spec/features/sentry_js_spec.rb +++ b/spec/features/sentry_js_spec.rb @@ -3,9 +3,9 @@ require 'spec_helper' RSpec.describe 'Sentry', feature_category: :error_tracking do - context 'when enable_new_sentry_clientside_integration is disabled' do + context 'when enable_new_sentry_integration is disabled' do before do - stub_feature_flags(enable_new_sentry_clientside_integration: false) + stub_feature_flags(enable_new_sentry_integration: false) end it 'does not load sentry if sentry is disabled' do @@ -26,9 +26,9 @@ end end - context 'when enable_new_sentry_clientside_integration is enabled' do + context 'when enable_new_sentry_integration is enabled' do before do - stub_feature_flags(enable_new_sentry_clientside_integration: true) + stub_feature_flags(enable_new_sentry_integration: true) end it 'does not load sentry if sentry settings are disabled' do diff --git a/spec/lib/gitlab/gon_helper_spec.rb b/spec/lib/gitlab/gon_helper_spec.rb index 068f3cd092ca3fbd7ab1f08c19ae8f19b84d36b7..e95623a01e11071ae0b6beef1878781083e7442e 100644 --- a/spec/lib/gitlab/gon_helper_spec.rb +++ b/spec/lib/gitlab/gon_helper_spec.rb @@ -89,9 +89,9 @@ helper.add_gon_variables end - context 'when enable_new_sentry_clientside_integration is disabled' do + context 'when enable_new_sentry_integration is disabled' do before do - stub_feature_flags(enable_new_sentry_clientside_integration: false) + stub_feature_flags(enable_new_sentry_integration: false) end it 'does not set sentry dsn and environment from config' do