Commit 94aabdbb authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Improved exception digest in logging. [skip ci]

parent c6bd4b75
Pipeline #45947 skipped
......@@ -153,11 +153,8 @@ class LogstashFormatter(logstash.formatter.LogstashFormatterBase):
for key, value in structlog.items():
if key in ('event', 'stack_info', 'id', 'timestamp'):
continue
elif key in ['exception']:
digest_value = str(value)
if len(digest_value) > 256:
digest_value = digest_value[:256]
message['exception.digest'] = digest_value
elif key == 'exception':
message['exception.digest'] = str(value)[-256:]
elif key in (
'upload_id', 'calc_id', 'mainfile',
'service', 'release'):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment