Page MenuHomePhabricator

[EPIC] Deprecate mw.eventLog.logEvent()
Open, Needs TriagePublic

Description

Since all legacy EventLogging schemas have been removed from the production codebases, mw.eventLog.logEvent() is just a proxy for mw.eventLog.submit(). It should be deprecated in order to narrow the EventLogging JS API.

We should also consider deprecating mw.eventLog.sendBeacon() at the same time. There is one use of the method outside of EventLogging, which could be cleared up easily.

TODO

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Decide how to handle indirect calls of .logEvent() (i.e. calls to mw.track( 'event.Foo' ))

There are no calls to mw.track( 'event.Foo' ) on-wiki (see https://global-search.toolforge.org/?q=mw.track%5C%28+%5B%27%22%5Devent%5C.&regex=1&namespaces=&title=). All calls to mw.track( 'event.Foo' ) reference legacy schemas that have been migrated to the Event Platform. Therefore, we can safely update the event.* topic subscriber to use mw.eventLog.submit().