Merge pull request #2618 from ryanpetrello/json-activity-stream-changes

send activity stream changes as raw JSON, not a JSON-ified string

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2018-11-06 19:45:19 +00:00 committed by GitHub
commit 2c6711e183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,10 @@ class LogstashFormatter(LogstashFormatterVersion1):
to the logging receiver
'''
if kind == 'activity_stream':
try:
raw_data['changes'] = json.loads(raw_data.get('changes', '{}'))
except Exception:
pass # best effort here, if it's not valid JSON, then meh
return raw_data
elif kind == 'system_tracking':
data = copy(raw_data['ansible_facts'])