However, since $wgEventLoggingStreamNames is a subset of the set of stream configurations, $wgEventStreams, it can be automatically generated given some convention. For example, let's say that if an event stream has the event_logging_js producer, then it is added to $wgEventLoggingStreamNames:
$wgEventLoggingStreamNames = array_keys( array_filter( $wgEventStreams, fn ( $eventStream ) => isset( $eventStream[ 'producers' ] ) ? isset( $eventStream[ 'producers' ][ 'event_logging_js' ] ) : false ) );
The above could be implemented in operations/mediawiki-config or the EventLogging extension.
- We still minimise bytes sent
- It Just Works™ - contributors/EventLogging maintainers no longer need to remember to update $wgEventLoggingStreamNames
- The above would run for every request served by the app servers