Red Hat Bugzilla – Bug 1292673
Add user's email to a comment at the start of SQL sent to DB
Last modified: 2016-04-18 01:01:38 EDT
It would be very handy for tracking who or what is causing load on the Database if a comment with the user running the query and which Module::function it's coming from.
Takes the form:
/* $user $module::func */
As discussed with mtyson we will only log the email address and only on the main search call. f other issues pop up where we want to track this we will add comments to them. Reasoning is to minimize overhead.
Verified on version 5.0.2.rh2, PASS
1. Login bugzilla, then do a main search, like search summary and comment
2. Then check the db log, could get below:
2016-03-22 09:43:42 UTC : [1-1] user=bugs,db=bugs LOG: duration: 9727.002 ms statement: /* firstname.lastname@example.org */ SELECT bugs.bug_id AS bug_id, ......