Commit 0e2a0b99 authored by Sean McGivern's avatar Sean McGivern Committed by James Lopez

Exclude extra.server fields from exceptions_json.log

These fields aren't really useful in a log, because we should know what
the server's OS and runtime were. They contribute to increasing log
volume.
parent 08ca0a27
---
title: Exclude extra.server fields from exceptions_json.log
merge_request: 32770
author:
type: changed
......@@ -728,17 +728,6 @@ Each line contains a JSON line that can be ingested by Elasticsearch. For exampl
"severity": "ERROR",
"time": "2019-12-17T11:49:29.485Z",
"correlation_id": "AbDVUrrTvM1",
"extra.server": {
"os": {
"name": "Darwin",
"version": "Darwin Kernel Version 19.2.0",
"build": "19.2.0",
},
"runtime": {
"name": "ruby",
"version": "ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin18]"
}
},
"extra.project_id": 55,
"extra.relation_key": "milestones",
"extra.relation_index": 1,
......
......@@ -12,6 +12,8 @@ module Gitlab
'exception.message' => exception.message
)
payload.delete('extra.server')
if exception.backtrace
payload['exception.backtrace'] = Gitlab::BacktraceCleaner.clean_backtrace(exception.backtrace)
end
......
Markdown is supported
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