When to use Metrics Platform for instrumentation:
- New products inside MediaWiki without pre-existing Event Platform instrumentation
When to use Event Platform for instrumentation:
- Web browsers (e.g. if we want to instrument the Add a Fact browser extension that Future Audiences is working on)
- Backend services outside MediaWiki
- any website outside MediaWiki are all clients where the instrumentation would be bespoke / from scratch but could at least use Metrics Platform data contract schema for events.
- Existing features instrumented using the Event Platform, where new instrumentation would need to fit in. In those cases it can be preferable to stick with that platform so that everything's in a single place and uses the same approach, rather than have some parts on one and some on the other (and it might not be meaningful to migrate everything yet).
- Platforms that don't have access to Metrics Platform, such as the iOS app
Documentation:
- https://wikitech.wikimedia.org/wiki/Event_Platform/Instrumentation_How_To
- https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_An_Instrument
- https://www.mediawiki.org/wiki/Extension:EventLogging/Guide
To do:
- Work with stakeholders to develop clear guidance
- Update the documentation (Note: Consider removing the “instrumentation “ specific parts from the Event Platform page and make it more generically about how to submit events.)