T370880: [EPIC] FY 24/25 SDS 2.1.7 | Alpha Release of Instrument Configuration System (MPIC)
Description
This task is the PHP client update AC of T368326: Update Metrics Platform Client Libraries to accept experiment membership. Update the Metrics Platform PHP client library to include the experiments enrollment data object in the final submit method of the metrics client.
With the proposed updates to the experiment membership tracking schema (fragment proposed in T389995), we will need to update the PHP client library to supplements events i.e. be able to read and populate fields for the new experiment data object (to supercede the previously defined experiments data object)
Proposed payload to be added to all events:
experiment: {
enrolled: "2025-hoverlinks-blue-3",
assigned: "a_group_name",
subject_id: "0000001badb00200000ff1ce1badb002000000ff1ce0000000ff1ce0000000",
sampling_unit: "mw-user",
other_assigned: {
"experiment_name_2": "control",
"experiment_name_3": "any_group"
}
}Acceptance Criteria
- Update the prod PHP instruments to use the new web base schema
- Read experiment details from wgMetricsPlatformUserExperiments and prepare them according to the experiment schema fragment
- Supplement events with the experiment configuration details when it’s a requested contextual attribute
- Decorate events with enrolled, assigned, subject_id, sampling_unit keys for experiment-related events, and other_assigned for all events.
- Implement an Instrument class (similar to the one we have for the JS client library)
- Leave enrollment details as they are when coordinator is previously set to custom. sampling_unit, subject_ids and other_assigned won't be filled and we will assume that enrolled and assigned were filled by the custom coordinator
- coordinator will be set to forced when the assigned group for the enrolled experiment has been overriden
Required
- Unit/Integration tests?
- Documentation?
- Passed QA?



