diff --git a/app/assets/javascripts/vue_merge_request_widget/components/extensions/telemetry.js b/app/assets/javascripts/vue_merge_request_widget/components/extensions/telemetry.js index e3f87c08ad4f6fbddf92148ef60e3ce1a9f49997..4f8f8d6cb58097f6f71fd4c8bd2f3c0d8c7012d0 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/extensions/telemetry.js +++ b/app/assets/javascripts/vue_merge_request_widget/components/extensions/telemetry.js @@ -6,86 +6,6 @@ import { TELEMETRY_WIDGET_FULL_REPORT_CLICKED, } from '../../constants'; -/* - * Additional events to send beyond the defaults for certain widget extensions - */ -const nonStandardEvents = { - codeQuality: { - uniqueUser: { - expand: ['i_testing_code_quality_widget_total'], - }, - counter: {}, - }, - terraform: { - uniqueUser: { - expand: ['i_testing_terraform_widget_total'], - }, - counter: {}, - }, - issues: { - uniqueUser: { - expand: ['i_testing_issues_widget_total'], - }, - counter: {}, - }, - testSummary: { - uniqueUser: { - expand: ['i_testing_summary_widget_total'], - }, - counter: {}, - }, - metrics: { - uniqueUser: { - expand: ['i_testing_metrics_report_widget_total'], - }, - counter: {}, - }, - browserPerformance: { - uniqueUser: { - expand: ['i_testing_web_performance_widget_total'], - }, - counter: {}, - }, - licenseCompliance: { - uniqueUser: { - expand: ['i_testing_license_compliance_widget_total'], - }, - counter: {}, - }, - loadPerformance: { - uniqueUser: { - expand: ['i_testing_load_performance_widget_total'], - }, - counter: {}, - }, - statusChecks: { - uniqueUser: { - expand: ['i_testing_status_checks_widget'], - }, - counter: {}, - }, -}; - -function combineDeepArray(path, ...objects) { - const parts = path.split('.'); - const allEntries = objects.reduce((entries, currentObject) => { - let expandedEntries = entries; - let traversed = currentObject; - - parts.forEach((part) => { - traversed = traversed?.[part]; - }); - - if (traversed) { - expandedEntries = [...entries, ...traversed]; - } - - return expandedEntries; - }, []); - - return Array.from(new Set(allEntries)); -} - function simplifyWidgetName(componentName) { const noWidget = componentName.replace(/^Widget/, ''); @@ -166,7 +86,6 @@ function defaultBehaviorEvents({ bus, config }) { function baseTelemetry(componentName) { const simpleExtensionName = simplifyWidgetName(componentName); - const additionalNonStandard = nonStandardEvents[simpleExtensionName] || {}; /* * Telemetry config format is: * { @@ -179,7 +98,7 @@ function baseTelemetry(componentName) { * - uniqueUser is sent to RedisHLL * - counter is sent to a regular Redis counter */ - const defaultTelemetry = { + return { uniqueUser: { view: [`${baseRedisEventName(simpleExtensionName)}_view`], expand: [`${baseRedisEventName(simpleExtensionName)}_expand`], @@ -191,27 +110,6 @@ function baseTelemetry(componentName) { clickFullReport: [`${baseRedisEventName(simpleExtensionName)}_count_click_full_report`], }, }; - - return { - uniqueUser: { - view: combineDeepArray('uniqueUser.view', defaultTelemetry, additionalNonStandard), - expand: combineDeepArray('uniqueUser.expand', defaultTelemetry, additionalNonStandard), - clickFullReport: combineDeepArray( - 'uniqueUser.clickFullReport', - defaultTelemetry, - additionalNonStandard, - ), - }, - counter: { - view: combineDeepArray('counter.view', defaultTelemetry, additionalNonStandard), - expand: combineDeepArray('counter.expand', defaultTelemetry, additionalNonStandard), - clickFullReport: combineDeepArray( - 'counter.clickFullReport', - defaultTelemetry, - additionalNonStandard, - ), - }, - }; } export function createTelemetryHub(componentName) { diff --git a/config/metrics/counts_28d/20210216184140_testing_total_unique_counts_monthly.yml b/config/metrics/counts_28d/20210216184140_testing_total_unique_counts_monthly.yml index 9c8ce1a1f06d4adef36013a1e85850061c98f0c1..c7667b902f2c6429dd762c128d4d7a34300e1af6 100644 --- a/config/metrics/counts_28d/20210216184140_testing_total_unique_counts_monthly.yml +++ b/config/metrics/counts_28d/20210216184140_testing_total_unique_counts_monthly.yml @@ -13,14 +13,10 @@ instrumentation_class: RedisHLLMetric options: events: - i_testing_test_case_parsed - - i_testing_metrics_report_widget_total - i_testing_group_code_coverage_visit_total - i_testing_full_code_quality_report_total - - i_testing_web_performance_widget_total - i_testing_group_code_coverage_project_click_total - - i_testing_load_performance_widget_total - i_testing_metrics_report_artifact_uploaders - - i_testing_summary_widget_total - users_expanding_testing_code_quality_report - users_expanding_testing_accessibility_report distribution: diff --git a/config/metrics/counts_28d/20210413205507_i_testing_summary_widget_total_monthly.yml b/config/metrics/counts_28d/20210413205507_i_testing_summary_widget_total_monthly.yml index ed25f2c18a80bf41b05985108fb3e4b6f819d57f..cdbd4b97ab95684948afa66badb967f31971fd86 100644 --- a/config/metrics/counts_28d/20210413205507_i_testing_summary_widget_total_monthly.yml +++ b/config/metrics/counts_28d/20210413205507_i_testing_summary_widget_total_monthly.yml @@ -7,9 +7,11 @@ product_stage: verify product_group: pipeline_execution product_category: testing value_type: number -status: active +status: removed milestone: "13.11" +milestone_removed: "15.11" introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59316 +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 time_frame: 28d data_source: redis_hll instrumentation_class: RedisHLLMetric diff --git a/config/metrics/counts_7d/20210413205507_i_testing_summary_widget_total_weekly.yml b/config/metrics/counts_7d/20210413205507_i_testing_summary_widget_total_weekly.yml index 015fd1e99b05fb3dcb491b18460f913ab3e9d403..9bb065e3a0ef288a1247bd5d05011c64c240775e 100644 --- a/config/metrics/counts_7d/20210413205507_i_testing_summary_widget_total_weekly.yml +++ b/config/metrics/counts_7d/20210413205507_i_testing_summary_widget_total_weekly.yml @@ -7,9 +7,11 @@ product_stage: verify product_group: pipeline_execution product_category: testing value_type: number -status: active +status: removed milestone: "13.11" +milestone_removed: "15.11" introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59316 +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 time_frame: 7d data_source: redis_hll instrumentation_class: RedisHLLMetric diff --git a/ee/config/metrics/counts_28d/20210216182139_i_testing_metrics_report_widget_total_monthly.yml b/ee/config/metrics/counts_28d/20210216182139_i_testing_metrics_report_widget_total_monthly.yml index 727107aa242541e85ea4f8ba75bf4798f53bf0d2..c09fa04de0b5f3450be7ba09078a79fa183849b6 100644 --- a/ee/config/metrics/counts_28d/20210216182139_i_testing_metrics_report_widget_total_monthly.yml +++ b/ee/config/metrics/counts_28d/20210216182139_i_testing_metrics_report_widget_total_monthly.yml @@ -7,7 +7,7 @@ product_stage: verify product_group: pipeline_execution product_category: code_testing value_type: number -status: active +status: removed time_frame: 28d data_source: redis_hll instrumentation_class: RedisHLLMetric @@ -21,3 +21,5 @@ tier: - ultimate performance_indicator_type: [] milestone: "<13.9" +milestone_removed: "15.11" +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 diff --git a/ee/config/metrics/counts_28d/20210216182151_i_testing_web_performance_widget_total_monthly.yml b/ee/config/metrics/counts_28d/20210216182151_i_testing_web_performance_widget_total_monthly.yml index 5232972a7a31e62e6f14c60b58258923e7fe4b42..8b23d034fca0ec6b618f96915e0c2fb97b18e643 100644 --- a/ee/config/metrics/counts_28d/20210216182151_i_testing_web_performance_widget_total_monthly.yml +++ b/ee/config/metrics/counts_28d/20210216182151_i_testing_web_performance_widget_total_monthly.yml @@ -8,7 +8,7 @@ product_stage: verify product_group: pipeline_execution product_category: web_performance value_type: number -status: active +status: removed time_frame: 28d data_source: redis_hll instrumentation_class: RedisHLLMetric @@ -22,3 +22,5 @@ tier: - ultimate performance_indicator_type: [] milestone: "<13.9" +milestone_removed: "15.11" +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 diff --git a/ee/config/metrics/counts_28d/20210216182156_i_testing_load_performance_widget_total_monthly.yml b/ee/config/metrics/counts_28d/20210216182156_i_testing_load_performance_widget_total_monthly.yml index f4a5001806b0aaf1331fe40a051dbc344016a390..948113c8498e969b9f198ea0596ed65b0760a18e 100644 --- a/ee/config/metrics/counts_28d/20210216182156_i_testing_load_performance_widget_total_monthly.yml +++ b/ee/config/metrics/counts_28d/20210216182156_i_testing_load_performance_widget_total_monthly.yml @@ -8,7 +8,7 @@ product_stage: verify product_group: pipeline_execution product_category: load_testing value_type: number -status: active +status: removed time_frame: 28d data_source: redis_hll instrumentation_class: RedisHLLMetric @@ -22,3 +22,5 @@ tier: - ultimate performance_indicator_type: [] milestone: "<13.9" +milestone_removed: "15.11" +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 diff --git a/ee/config/metrics/counts_28d/20210216183209_i_testing_paid_monthly_active_user_total.yml b/ee/config/metrics/counts_28d/20210216183209_i_testing_paid_monthly_active_user_total.yml index 97d28c409fd19144950efcc3585c277daa38b798..d012c471608985b66d6a1229a025e1b4f5853f6b 100644 --- a/ee/config/metrics/counts_28d/20210216183209_i_testing_paid_monthly_active_user_total.yml +++ b/ee/config/metrics/counts_28d/20210216183209_i_testing_paid_monthly_active_user_total.yml @@ -17,11 +17,8 @@ options: operator: OR attribute: user_id events: - - 'i_testing_web_performance_widget_total' - 'i_testing_full_code_quality_report_total' - 'i_testing_group_code_coverage_visit_total' - - 'i_testing_load_performance_widget_total' - - 'i_testing_metrics_report_widget_total' distribution: - ee tier: diff --git a/ee/config/metrics/counts_7d/20210216182138_i_testing_metrics_report_widget_total_weekly.yml b/ee/config/metrics/counts_7d/20210216182138_i_testing_metrics_report_widget_total_weekly.yml index 22aea2fae0a7763ff11f1eb2df16bdeb97eed93c..c735a7a8722c84c30459bf60d3aa4f0ba65dfdd5 100644 --- a/ee/config/metrics/counts_7d/20210216182138_i_testing_metrics_report_widget_total_weekly.yml +++ b/ee/config/metrics/counts_7d/20210216182138_i_testing_metrics_report_widget_total_weekly.yml @@ -7,7 +7,7 @@ product_stage: verify product_group: pipeline_execution product_category: code_testing value_type: number -status: active +status: removed time_frame: 7d data_source: redis_hll instrumentation_class: RedisHLLMetric @@ -21,3 +21,5 @@ tier: - ultimate performance_indicator_type: [] milestone: "<13.9" +milestone_removed: "15.11" +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 diff --git a/ee/config/metrics/counts_7d/20210216182149_i_testing_web_performance_widget_total_weekly.yml b/ee/config/metrics/counts_7d/20210216182149_i_testing_web_performance_widget_total_weekly.yml index 01f3e8bdddad68f6568b4c4f78bc564c312d5bd9..39172dff0fb63755bedbe2d589d279c56cee388d 100644 --- a/ee/config/metrics/counts_7d/20210216182149_i_testing_web_performance_widget_total_weekly.yml +++ b/ee/config/metrics/counts_7d/20210216182149_i_testing_web_performance_widget_total_weekly.yml @@ -8,7 +8,7 @@ product_stage: verify product_group: pipeline_execution product_category: web_performance value_type: number -status: active +status: removed time_frame: 7d data_source: redis_hll instrumentation_class: RedisHLLMetric @@ -22,3 +22,5 @@ tier: - ultimate performance_indicator_type: [] milestone: "<13.9" +milestone_removed: "15.11" +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 diff --git a/ee/config/metrics/counts_7d/20210216182154_i_testing_load_performance_widget_total_weekly.yml b/ee/config/metrics/counts_7d/20210216182154_i_testing_load_performance_widget_total_weekly.yml index f4c3832d6013dd6a6246a2e45aeeb92a07ae8503..b3b5505f1dd0cd24175b9dfa548f35fcbb1009d0 100644 --- a/ee/config/metrics/counts_7d/20210216182154_i_testing_load_performance_widget_total_weekly.yml +++ b/ee/config/metrics/counts_7d/20210216182154_i_testing_load_performance_widget_total_weekly.yml @@ -8,7 +8,7 @@ product_stage: verify product_group: pipeline_execution product_category: load_testing value_type: number -status: active +status: removed time_frame: 7d data_source: redis_hll instrumentation_class: RedisHLLMetric @@ -22,3 +22,5 @@ tier: - ultimate performance_indicator_type: [] milestone: "<13.9" +milestone_removed: "15.11" +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114018 diff --git a/ee/config/metrics/counts_7d/20210216183219_i_testing_paid_monthly_active_user_total.yml b/ee/config/metrics/counts_7d/20210216183219_i_testing_paid_monthly_active_user_total.yml index 400f81a6f5b5a4e8c61106db000207f52f9f0bb1..b1c7df18a8331dbd05b12484f0db1b078b1ad33b 100644 --- a/ee/config/metrics/counts_7d/20210216183219_i_testing_paid_monthly_active_user_total.yml +++ b/ee/config/metrics/counts_7d/20210216183219_i_testing_paid_monthly_active_user_total.yml @@ -17,11 +17,8 @@ options: operator: OR attribute: user_id events: - - 'i_testing_web_performance_widget_total' - 'i_testing_full_code_quality_report_total' - 'i_testing_group_code_coverage_visit_total' - - 'i_testing_load_performance_widget_total' - - 'i_testing_metrics_report_widget_total' distribution: - ee tier: diff --git a/ee/config/metrics/counts_7d/20210216184138_testing_total_unique_counts_weekly.yml b/ee/config/metrics/counts_7d/20210216184138_testing_total_unique_counts_weekly.yml index f1c63b3b48e168640166c55715b160c9ee6a0ab2..b54ed62dd04502c13091adfdaa93197bd78e3d0a 100644 --- a/ee/config/metrics/counts_7d/20210216184138_testing_total_unique_counts_weekly.yml +++ b/ee/config/metrics/counts_7d/20210216184138_testing_total_unique_counts_weekly.yml @@ -13,14 +13,10 @@ instrumentation_class: RedisHLLMetric options: events: - i_testing_test_case_parsed - - i_testing_metrics_report_widget_total - i_testing_group_code_coverage_visit_total - i_testing_full_code_quality_report_total - - i_testing_web_performance_widget_total - i_testing_group_code_coverage_project_click_total - - i_testing_load_performance_widget_total - i_testing_metrics_report_artifact_uploaders - - i_testing_summary_widget_total - users_expanding_testing_code_quality_report - users_expanding_testing_accessibility_report distribution: diff --git a/ee/lib/ee/gitlab/usage_data_counters/known_events/common.yml b/ee/lib/ee/gitlab/usage_data_counters/known_events/common.yml index 25e2823c82c35eb8be2a0913ee01479787fe63dd..779e4a0cb572931b09dc277c1baa54684897214f 100644 --- a/ee/lib/ee/gitlab/usage_data_counters/known_events/common.yml +++ b/ee/lib/ee/gitlab/usage_data_counters/known_events/common.yml @@ -11,14 +11,8 @@ aggregation: weekly - name: i_testing_group_code_coverage_visit_total aggregation: weekly -- name: i_testing_load_performance_widget_total - aggregation: weekly - name: i_testing_metrics_report_artifact_uploaders aggregation: weekly -- name: i_testing_metrics_report_widget_total - aggregation: weekly -- name: i_testing_web_performance_widget_total - aggregation: weekly - name: i_search_advanced aggregation: weekly - name: i_search_paid diff --git a/lib/gitlab/usage_data_counters/known_events/common.yml b/lib/gitlab/usage_data_counters/known_events/common.yml index f5973587ebb91158526b25d4fb08b572c343caff..d3520961665bfb783376e0b44625215786c9e812 100644 --- a/lib/gitlab/usage_data_counters/known_events/common.yml +++ b/lib/gitlab/usage_data_counters/known_events/common.yml @@ -62,8 +62,6 @@ # Testing category - name: i_testing_test_case_parsed aggregation: weekly -- name: i_testing_summary_widget_total - aggregation: weekly - name: i_testing_test_report_uploaded aggregation: weekly - name: i_testing_coverage_report_uploaded diff --git a/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js b/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js index fad501ee7f50b69f4ab8851ee500cc12b865ae89..dfc2ee8e13cb04285ad9ed49b7485325358eda62 100644 --- a/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js +++ b/spec/frontend/vue_merge_request_widget/mr_widget_options_spec.js @@ -1197,33 +1197,6 @@ describe('MrWidgetOptions', () => { 'i_code_review_merge_request_widget_test_extension_count_expand_warning', ); }); - - it.each` - widgetName | nonStandardEvent - ${'WidgetCodeQuality'} | ${'i_testing_code_quality_widget_total'} - ${'WidgetTerraform'} | ${'i_testing_terraform_widget_total'} - ${'WidgetIssues'} | ${'i_testing_issues_widget_total'} - ${'WidgetTestSummary'} | ${'i_testing_summary_widget_total'} - `( - "sends non-standard events for the '$widgetName' widget", - async ({ widgetName, nonStandardEvent }) => { - const definition = { - ...workingExtension(), - name: widgetName, - }; - - registerExtension(definition); - createComponent(); - - await waitForPromises(); - - api.trackRedisHllUserEvent.mockClear(); - - findExtensionToggleButton().trigger('click'); - - expect(api.trackRedisHllUserEvent).toHaveBeenCalledWith(nonStandardEvent); - }, - ); }); it('triggers the "full report clicked" events when the appropriate button is clicked', () => {