Skip to content

Commit

Permalink
log canonical facts and request id (#1664)
Browse files Browse the repository at this point in the history
* log canonical fact collection and req id

* commas are important
  • Loading branch information
gravitypriest committed Jan 30, 2019
1 parent 287daa5 commit 8c2ce56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions insights/client/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ def upload_archive(self, data_collected, content_type, duration):

try:
c_facts = json.dumps(get_canonical_facts())
logger.debug('Canonical facts collected:\n%s', c_facts)
except Exception as e:
logger.debug('Error getting canonical facts: %s', e)
c_facts = None
Expand Down Expand Up @@ -743,6 +744,7 @@ def upload_archive(self, data_collected, content_type, duration):

logger.debug("Upload status: %s %s %s",
upload.status_code, upload.reason, upload.text)
logger.debug('Request ID: %s', upload.headers.get('x-rh-insights-request-id', None))
if upload.status_code in (200, 201):
# 200/201 from legacy, load the response
the_json = json.loads(upload.text)
Expand Down

0 comments on commit 8c2ce56

Please sign in to comment.