From 394babb9fd69b24e4efabaa1ef062801b2c05218 Mon Sep 17 00:00:00 2001 From: Santiago Faci Date: Tue, 12 Dec 2023 18:04:23 +0100 Subject: [PATCH] Remove partial migration of EditAttemptStep instrument The partial migration to Metrics Platform has been removed Bug: T351335 Change-Id: Idb62f92795cda98870c3add99c1b52eea1daac6b --- includes/Hooks.php | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 13e09aa7..c03a1a80 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -178,8 +178,6 @@ class Hooks implements $data['user_class'] = 'IP'; } - $this->doMetricsPlatformLogging( $action, $data ); - if ( !$inSample && !$shouldOversample ) { return; } @@ -193,42 +191,6 @@ class Hooks implements ); } - /** - * @see https://phabricator.wikimedia.org/T309013 - * @see https://phabricator.wikimedia.org/T309985 - */ - private function doMetricsPlatformLogging( string $action, array $data ): void { - unset( $data['version'] ); - unset( $data['action'] ); - - // Sampling rate (and therefore whether a stream should oversample) is captured in - // the stream config ($wgEventStreams). - unset( $data['is_oversample'] ); - unset( $data['session_token'] ); - - // Platform can be derived from the agent_client_platform_family context attribute - // mixed in by the JavaScript Metrics Platform Client. The context attribute will be - // "desktop_browser" or "mobile_browser" depending on whether the MobileFrontend - // extension has signalled that it is enabled. - unset( $data['platform'] ); - - unset( $data['page_id'] ); - unset( $data['page_title'] ); - unset( $data['page_ns'] ); - - // If the revision ID can be fetched (i.e. it is a positive integer), then it will be - //mixed in by the Metrics Platform Client. - if ( $data['revision_id'] ) { - unset( $data['revision_id'] ); - } - - unset( $data['user_id'] ); - unset( $data['user_editcount'] ); - unset( $data['mw_version'] ); - - EventLogging::submitMetricsEvent( 'eas.wt.' . $action, $data ); - } - /** * Log stuff to EventLogging's Schema:VisualEditorFeatureUse - * see https://meta.wikimedia.org/wiki/Schema:VisualEditorFeatureUse