Bug 1480760

Summary: [RFE] Specify "X-Correlation-ID" header for log correlation when making REST calls to Candlepin
Product: Red Hat Satellite Reporter: Craig Donnelly <cdonnell>
Component: Subscription ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, bkearney, ehelms, fgarciad, jcallaha, jsherril, kdixon, mmccune, sjagtap
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Craig Donnelly 2017-08-11 20:05:38 UTC
Description of problem:

When making REST calls to Candlepin the "X-Correlation-ID" request header should be set. This header can be used to specify a correlation id that will be printed out with every log message in Candlepin. This will make it easy to correlate requests from the Foreman logs with the Candlepin logs. Support for this header was added in Candlepin 2.0.

Version-Release number of selected component (if applicable):
6.3.0


Additional info:
This should be included for assistance in troubleshooting cross-component issues, so that we can track a single request or action across all components.

Comment 3 Satellite Program 2017-09-20 04:14:53 UTC
Upstream bug assigned to jsherril

Comment 4 Satellite Program 2017-09-26 18:16:56 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20488 has been resolved.

Comment 5 Sanket Jagtap 2017-12-12 09:20:40 UTC
Build: Satellite 6.3.0 snap28


The request send to satellite is reflected in the candlepin log in csid field
which would be helpful while dealing with cross component issues

production.log
2017-12-12 04:16:32 431a45c1 [app] [I] Started GET "/katello/api/v2/products/45" for 10.65.223.181 at 2017-12-12 04:16:32 -0500
2017-12-12 04:16:32 431a45c1 [app] [I] Processing by Katello::Api::V2::ProductsController#show as JSON
2017-12-12 04:16:32 431a45c1 [app] [I]   Parameters: {"api_version"=>"v2", "id"=>"45"}
2017-12-12 04:16:32 431a45c1 [app] [I] Current user: admin (administrator)


==> /var/log/candlepin/candlepin.log <==
2017-12-12 04:16:32,336 [thread=http-bio-8443-exec-8] [req=8ba82326-e597-4964-8171-092d1aa633f3, org=, csid=431a45c1] INFO  org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/owners/Default_Organization/products/215223095592/?include=name&include=attributes.name&include=attributes.value&include=productContent.content.contentUrl&include=productContent.content.label&include=productContent.content.modifiedProductIds&include=productContent.content.type&include=productContent.content.id&include=productContent.content.name
2017-12-12 04:16:32,352 [thread=http-bio-8443-exec-8] [req=8ba82326-e597-4964-8171-092d1aa633f3, org=, csid=431a45c1] INFO  org.candlepin.common.filter.LoggingFilter - Response: status=200, content-type="application/json", time=16

Comment 6 Satellite Program 2018-02-21 16:54:37 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/RHSA-2018:0336

Comment 7 Justin Sherrill 2020-10-21 14:44:27 UTC
*** Bug 1431777 has been marked as a duplicate of this bug. ***