Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1408420 - [RFE] Backport session/request id in logs
Summary: [RFE] Backport session/request id in logs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Logging
Version: 6.2.5
Hardware: x86_64
OS: All
low
low
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Roman Plevka
URL: http://projects.theforeman.org/issues...
Whiteboard:
: 1264827 1435563 (view as bug list)
Depends On:
Blocks: 1122832 1426404
TreeView+ depends on / blocked
 
Reported: 2016-12-23 10:31 UTC by Lukas Zapletal
Modified: 2019-06-13 21:25 UTC (History)
11 users (show)

Fixed In Version: foreman-1.11.0.72-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1426404 (view as bug list)
Environment:
Last Closed: 2017-05-01 13:57:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15863 0 None None None 2016-12-23 11:06:28 UTC
Foreman Issue Tracker 19017 0 None None None 2017-03-27 15:21:23 UTC
Red Hat Product Errata RHBA-2017:1191 0 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 17:49:42 UTC

Description Lukas Zapletal 2016-12-23 10:31:23 UTC
In upstream Foreman release, we include request and optionally session id in logs, so it will be much easier to match the specific request:

http://projects.theforeman.org/issues/15863

This small improvement would be very useful to backport into 6.2.

TRIAGE NOTES: Very small and standalone patch, zero risk.

DOCO NOTES: We need an upgrade note to make this new feature effective, logging.yaml must be modified:

 :pattern: "%d %.8X{session} [%c] [%.1l] %m\n"

Otherwise this won't be used

Comment 2 Bryan Kearney 2016-12-23 13:17:32 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15863 has been resolved.

Comment 3 Chris Duryee 2017-02-09 06:13:55 UTC
This would make debugging slow requests a lot easier, the current log is difficult to read when there's a lot of activity.

Comment 5 Satellite Program 2017-02-23 21:10:35 UTC
Please add verifications steps for this bug to help QE verify

Comment 6 Ivan Necas 2017-03-24 09:25:29 UTC
*** Bug 1435563 has been marked as a duplicate of this bug. ***

Comment 9 Ivan Necas 2017-03-24 09:36:51 UTC
Verification steps:

1. preform requests
2. the logs are prefixed by a hash, that groups the requests
2016-07-27T15:38:43 33b38af1 [app] [I] Started GET "/" for 127.0.0.1 at 2016-07-27 15:38:43 +0100
2016-07-27T15:38:45 33b38af1 [app] [I] Completed 200 OK in 1978ms (Views: 1695.6ms | ActiveRecord: 18.5ms
3. for web ui, the hash is determined by a session id: two different users have different hash
4. for API requests, the hash is unique per request.

Comment 10 Roman Plevka 2017-03-24 10:04:27 UTC
VERIFIED

for 6.2.9-1, the request ids are now logged as the 3rd field in production.log
Sat server also exposes this as a X-Request-Id in HTTP response.

2017-03-24 05:53:09 f67c1d8e [app] [I] Started HEAD "/api/v2/organizations" for 10.19.41.18 at 2017-03-24 05:53:09 -0400
2017-03-24 05:53:09 f67c1d8e [app] [I] Processing by Api::V2::OrganizationsController#index as JSON
2017-03-24 05:53:09 f67c1d8e [app] [I]   Parameters: {"apiv"=>"v2"}
2017-03-24 05:53:09 f67c1d8e [app] [I] Authorized user admin(Admin User)
2017-03-24 05:53:09 f67c1d8e [app] [I]   Rendered api/v2/taxonomies/index.json.rabl within api/v2/layouts/index_layout (5.7ms)
2017-03-24 05:53:09 f67c1d8e [app] [I] Completed 200 OK in 40ms (Views: 6.6ms | ActiveRecord: 14.4ms)

Comment 13 errata-xmlrpc 2017-05-01 13:57:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1191

Comment 14 Peter Vreman 2017-05-02 14:11:34 UTC
*** Bug 1264827 has been marked as a duplicate of this bug. ***


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