We're seeing ~2.5K validation errors to mediawiki.product_metrics.contributors.experiments from past 6 hours.
Inspecting the errors in Logstash, we see
"experiment": { "enrolled": "growthexperiments-revise-tone", "assigned": "control", "subject_id": "<redacted>", "sampling_unit": "mw-user", "coordinator": "default", "stream_name": "product_metrics.web_base", "schema_id": "/analytics/product_metrics/web/base/2.0.0", "contextual_attributes": [ "agent_client_platform", "agent_client_platform_family", "performer_is_logged_in", "performer_is_temp", "performer_pageview_id", "performer_active_browsing_session_token", "mediawiki_skin", "mediawiki_database" ] }, "$schema": "/analytics/product_metrics/web/base/1.5.0"
The error is '.experiment.coordinator' should be equal to one of the allowed values because default is not a valid experiment.coordinator value for pre-2.0.0 schemas.
However, the issue goes beyond that because EventGate stops validating experiment after it encounters that issue, but there's a lot of stuff in there that shouldn't be.
Root cause
In ReviseToneExperimentInteractionLogger.php:
$experimentConfig = $experiment->getExperimentConfig(); ... $eventData = [ 'experiment' => $experimentConfig, ] + $interactionData; $this->submitInteraction( RequestContext::getMain(), $action, $eventData );
This is because it wasn't possible to setStream(), but with T415277 it is now possible to use Experiment#send() with a custom stream in PHP.
Acceptance criteria
- GrowthExperiments ReviseTone experiment instrumentation uses Experiment#send()
- No more validation errors from mediawiki.product_metrics.contributors.experiments stream
