MediaWiki now supports adding context fields to all log events within the current request. You can use
LoggerFactory::getContext()->->add( [ 'myCustomField' => ... ] );
to add a field to all subsequent logs in the request, or
$scope = LoggerFactory::getContext()->->addScoped( [ 'myCustomField' => ... ] );
to do it within a given scope.
(For example, you can now filter Logstash to events logged in a specific job class with context_job_type, or a given special page with context_special_page_name.)