Page MenuHomePhabricator

Deploy the latest version of the JS Metrics Platform client library
Closed, ResolvedPublic5 Estimated Story Points

Description

Epic: T350495: [EPIC] Deploy latest version of Metrics Platform client libraries

Background

In T346287, T346288, and T346286, we updated the JS, Java, and PHP client libraries to produce core interaction events. Before they can be used by us and, eventually, by third-parties, they must be deployed.

AC

Event Timeline

Change 973770 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/EventLogging@master] lib: Update lib/metrics-platform to 1f3813bd9b86

https://gerrit.wikimedia.org/r/973770

Here's how I tested the above ☝️ :

  1. Make sure my MediaWiki Docker env is up to date
  2. Apply https://gerrit.wikimedia.org/r/973770 to extensions/EventLogging
  3. Add the following to LocalSettings.php:
LocalSettings.php
$wgEventStreams = [
  'test.metrics_platform.interactions' => [
    'schema_title' => '/analytics/product_metrics/web/base',
    'destination_event_service' => 'eventgate-analytics-external',
    'producers' => [
      'metrics_platform_client' => [
        'provide_values' => [
          'performer_is_logged_in',
          'mediawiki_skin',
        ],
      ],
    ],
  ],
];

// When $wgEventLoggingStreamNames is false (not falsy), the EventLogging
// JavaScript client will treat all streams as if they are configured and
// registered.
$wgEventLoggingStreamNames = [ 'test.metrics_platform.interactions' ];
  1. Navigate to http://localhost:8080/wiki/Main_Page
  2. Run the following in my browser's console:
mw.eventLog.submitInteraction('test.metrics_platform.interactions', '/analytics/product_metrics/web/base/1.0.0', 'init');
  1. Observe that an event has been submitted to, validated and accpeted by my local EventGate instance
phuedx set the point value for this task to 5.Nov 16 2023, 1:45 PM

Change 973770 merged by jenkins-bot:

[mediawiki/extensions/EventLogging@master] lib: Update lib/metrics-platform to 1f3813bd9b86

https://gerrit.wikimedia.org/r/973770

phuedx updated the task description. (Show Details)