We want to update MediaWiki DB query comments to include the request ID, so we can link slow/problematic queries with the request that triggered them.
performance_schema will need to be updated to strip out the request ID when aggregating/grouping queries together per discussion on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/721926 - I don't actually know what performance_schema is or what generates it, so pointers on that would be helpful.
The proposed syntax is r:{request_id} at the end of the comment, so a regex should be able to remove it.