Bug 1292673 - Add user's email to a comment at the start of SQL sent to DB
Add user's email to a comment at the start of SQL sent to DB
Product: Bugzilla
Classification: Community
Component: Database (Show other bugs)
Unspecified Unspecified
low Severity low (vote)
: ---
: ---
Assigned To: Jeff Fearn
Depends On:
  Show dependency treegraph
Reported: 2015-12-17 21:32 EST by Jeff Fearn
Modified: 2016-04-18 01:01 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-04-18 01:01:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Fearn 2015-12-17 21:32:45 EST
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 */
Comment 1 Jeff Fearn 2016-02-24 01:22:13 EST
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.
Comment 2 Rony Gong 2016-03-22 05:46:56 EDT
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 [15422]: [1-1] user=bugs,db=bugs LOG:  duration: 9727.002 ms  statement: /* qgong@redhat.com */ SELECT bugs.bug_id AS bug_id, ......

Note You need to log in before you can comment on or make changes to this bug.