Remove partial migration of EditAttemptStep instrument

The partial migration to Metrics Platform has been removed

Bug: T351335
Change-Id: Idb62f92795cda98870c3add99c1b52eea1daac6b
This commit is contained in:
Santiago Faci 2023-12-12 18:04:23 +01:00
parent ca958473ec
commit 394babb9fd

View file

@ -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