Description
Create a dogfooding plan for the MPIC alpha release.
The goal is to test and have confidence in MP's CTR instrument and experiment using MPIC for instrument and experiment configuration, from within a MediaWiki extension, to sample and bucket users in an A/B test in order to send events with instrument and experiment tracking data to MP's base web stream and eventual destination in MP's monotable in Hive.
While some parts may be tested in isolation and via automation (i.e. testing API endpoints), the plan must include an approach for end-to-end testing from producer to consumer of the data.
For the MPIC prototype, we used an existing instrument's production stream config to test MP's overriding functionality using a ToolForge instance of a MediaWiki installation.
Questions / Considerations:
- Do we want to test an actual instrument and see it send data to Hive? to the beta stream? Yes
- Will a ToolForge instance suffice? No - we want to test in a production environment before the first product team uses the Experiment Platform apparatus
- Do we deploy to TestWiki with production stream and producer config?
- Do we create a fake experiment with MP's CTR instrument with production config and send dummy data to Hive? to beta stream?
- What are the metrics/scope for success?
- a validated event? does scoping event to the beta stream suffice?
- data in Hive? do we send test data to a production table?
Technical Notes
See the Proposed Changes/Additions section of the MPIC alpha implementation plan to understand interdependent parts of the system that will enable a simple A/B test:
EPIC (fka MPIC)
frontend - UI for instrument and experiment configuration
backend - API for querying instrument and experiment configs:
Code repo - https://gitlab.wikimedia.org/repos/data-engineering/mpic
Metrics Platform extension (rename TBD - T381285: Create work plan for renaming of Metrics Platform to Experimentation Lab)
Function:
- Fetches instrument and experiment configs from MPIC public APIs
- Merges instrument configs into EventStreamConfig's API for exporting event stream configs.
- Sets config var for user's experiments' enrollment data
- Buckets logged-in users into control and treatment cohorts during an active experiment into which users are enrolled
Code repo - https://gerrit.wikimedia.org/g/mediawiki/extensions/MetricsPlatform
Metrics Platform client libraries (rename TBD - T381285: Create work plan for renaming of Metrics Platform to Experimentation Lab)
Function:
- Accepts instrument name as a unique identifier for MP's monotable
- Fetches experiment enrollment data for sending with events by checking for config var set by Metrics Platform extension.
- Contains standardized instruments for collecting data on Clickthrough Rates
- Submits events to EventGate intake service
Work in progress:
Code repo - https://gitlab.wikimedia.org/repos/data-engineering/metrics-platform
Metrics Platform schemas (rename TBD - T381285: Create work plan for renaming of Metrics Platform to Experimentation Lab)
Function:
- Validates events sent via MP client libraries
- Enforces data contract of MP-based instruments
Acceptance Criteria
- A plan is documented
- Necessary tickets are created



