Class: Gitlab::ErrorTracking::LogFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/error_tracking/log_formatter.rb

Instance Method Summary collapse

Instance Method Details

#generate_log(exception, context_payload) ⇒ Object

Note: all the accesses to Raven’s contexts here are to keep the backward-compatibility to Sentry’s built-in integrations. In future, they can be removed.



9
10
11
12
13
14
15
16
17
18
# File 'lib/gitlab/error_tracking/log_formatter.rb', line 9

def generate_log(exception, context_payload)
  payload = {}

  Gitlab::ExceptionLogFormatter.format!(exception, payload)
  append_user_to_log!(payload, context_payload)
  append_tags_to_log!(payload, context_payload)
  append_extra_to_log!(payload, context_payload)

  payload
end