Background
Soon after the change for T409965: Enable experiment enrollment in the MediaWiki Action API was deployed to group1 wikis, there was a spike in validation errors on the mediawiki.api_request stream. In response, we (temporarily) disabled adding experiment enrollment information to the global logging context for MediaWiki Action API requests. This means that experiment enrollment information is not included in any lines logged during an API request.
Why did this happen?
This happened because API requests are sent as events to the stream via the Monolog logging library and we starting adding experiment enrollment information to the global logging context, which is mixed into all log lines. This information was added to the events sent to the stream, triggering a validation error.
AC
- We determine if the mediawiki.api_request stream is required
- The /mediawiki/api/request/1.0.0 schema is updated to include an context.ab_tests property (or, make it not fail when adding context.ab_tests)
- We re-enable adding experiment enrollment information to the global logging context for MediaWiki Action API requests
Notes
- This will happen again when another developer adds to the global logging context. The schema should be made more resilient