MediaWiki-Docker/Configuration recipes/EventLogging

Minimal setup
If you only need to satisfy a dependency on EventLogging for another extension, and/or only need to inspect or debug events from the client-side in a browser, then the Event Platform extensions and their configuration are not required. Instead the standard dependency-free installation documented on Extension:EventLogging will suffice.


 * 1) clone EventLogging.
 * 2) Add the below to.
 * 3) No step three!

Event Platform
Follow the below steps to create a more complete Event Platform environment, akin to WMF production. You will be able to log events to a containerized EventGate instance (herein "EventGate") from both server-side and client-side MediaWiki code. EventGate will validate events against schemas fetched from https://schema.wikimedia.org.

Extensions
You need to install these extensions:


 * EventBus
 * EventStreamConfig
 * EventLogging
 * WikimediaEvents (not strictly required, it adds Wikimedia-specific instrumentations).

i.e.

Running
You can test the above by running this in your browser's JavaScript console:

Event Platform with Local Schema Repositories
Iterating on the above, setting up and configuring your MediaWiki-Docker instance as below will reconfigure EventGate to validate events against schemas from clones of the schema repositories.

Repositories
You need to clone these repositories into the  directory:


 * schemas/event/primary
 * schemas/event/secondary

e.g.

Legacy EventLogging
In the legacy EventLogging pipeline, schemas were defined and documented on metawiki. Event though the legacy EventLogging pipeline is being migrated away from, you might still be called on to modify an instrument that uses one such schema.

Following on from the section above, setting up and configuring your MediaWiki-Docker instance as below will allow you to log events to a containerized legacy EventLogging event intake service.

Unit testing
If you need to run PHPUnit tests in docker, any test which incidentally causes event logging to occur will cause PHPUnit to error immediately with  The easiest way to avoid this is to not configure event logging when the unit tests are running. This can be done in  like so: If you actually need to test the sending of events... good luck, please update this recipe if you work it out.