Page MenuHomePhabricator

Instrument basic metrics for summarization experiment
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

In T376903, we discovered statsd/graphite could be used to cover the essential metrics we're seeking to obtain with our summarization experiment. This task covers wiring the metrics up so that the extension is sending data for the summary experiment

User story

  • As an analyst, I want to be able to assess the success of the summarization experiment by looking at usage metrics

Requirements

  • Count pageviews where summaries are displayed
  • count summaries opened
  • count clicks to yes
  • count clicks to no

Acceptance criteria

The following metrics are sent to the statv endpoint
e.g: https://en.wikipedia.org/beacon/statsv?MediaWiki.experiment.web.summaries.enwiki.available=1c

  • enabled - on every page load when the browser extension in enabled.
  • available - on every page load when a simplified summary is available.
  • opened - when a simplified summary is expanded.
  • yes - when the 'was this helpful' yes button is clicked.
  • no - when the 'was this helpful' no button is clicked.

BDD

Feature: Instrumentation for Summarization Experiment  

  Scenario: Send metrics for enabled state  
    Given the browser extension is installed and enabled  
    When the user visits a page  
    Then a metric is sent to the statsv endpoint with the label "enabled".  

  Scenario: Send metrics for available summaries  
    Given a simplified summary is available for a page  
    When the user visits the page  
    Then a metric is sent to the statsv endpoint with the label "available".  

  Scenario: Send metrics for opened summaries  
    Given a simplified summary is available on the page  
    When the user expands the summary  
    Then a metric is sent to the statsv endpoint with the label "opened".  

  Scenario: Send metrics for "Was this helpful?" feedback  
    Given a simplified summary is available on the page  
    When the user clicks the "yes" button  
    Then a metric is sent to the statsv endpoint with the label "yes".  
    And when the user clicks the "no" button  
    Then a metric is sent to the statsv endpoint with the label "no".

Test Steps

Test Case 1: Verify Instrumentation for Summarization Metrics

  1. Ensure the browser extension is installed and enabled.
  2. Visit a page where summaries are enabled.
  3. AC1: Confirm a metric is sent to the statsv endpoint with the label “enabled”.
  4. AC2: Confirm a metric is sent to the statsv endpoint with the label “available” if a summary is present.
  5. Expand the summary on the page.
  6. AC3: Confirm a metric is sent to the statsv endpoint with the label “opened”.
  7. Interact with the “Was this helpful?” buttons:
  8. Click “yes”.
  9. AC4: Confirm a metric is sent to the statsv endpoint with the label “yes”.
  10. Click “no”.
  11. AC5: Confirm a metric is sent to the statsv endpoint with the label “no”.

QA Results - Prod

Communication criteria - does this need an announcement or discussion?

Rollback plan

Rollback should be fine - may need to document when if it would affect the data, but we should be okay

Event Timeline

To be discussed/estimated async, considered for sprint backlog tomorrow

We seem to all agree on 2 - also noting this is going to slip (sorry!)

The following is a build with the latest instrumentation and summary experiment enabled for QA purposes:

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki (chrome extension version 1.0.7)
OS: macOS
Browser: Chrome
Device: MS
Emulated Device: NA

Test Artifact(s):

Test Steps
NOTE: This is validated in T378098#10342378 AC4.

Test Case 1: Verify Instrumentation for Summarization Metrics

  1. Ensure the browser extension is installed and enabled.
  2. Visit a page where summaries are enabled.
  3. AC1: Confirm a metric is sent to the statsv endpoint with the label “enabled”.
  4. AC2: Confirm a metric is sent to the statsv endpoint with the label “available” if a summary is present.
  5. Expand the summary on the page.
  6. AC3: Confirm a metric is sent to the statsv endpoint with the label “opened”.
  7. Interact with the “Was this helpful?” buttons:
  8. Click “yes”.
  9. AC4: Confirm a metric is sent to the statsv endpoint with the label “yes”.
  10. Click “no”.
  11. AC5: Confirm a metric is sent to the statsv endpoint with the label “no”.
ovasileva claimed this task.