Commit 4b78115b authored by Matthias Käppler's avatar Matthias Käppler

Merge branch 'sh-puma-lowlevel-err-to-sentry' into 'master'

Connect Puma low-level error handler to Sentry in puma.rb example

See merge request gitlab-org/gitlab!66712
parents b61000b6 2da8f89e
......@@ -82,3 +82,12 @@ json_formatter = Gitlab::PumaLogging::JSONFormatter.new
log_formatter do |str|
json_formatter.call(str)
end
lowlevel_error_handler do |ex, env|
if Raven.configuration.capture_allowed?
Raven.capture_exception(ex, tags: { 'handler': 'puma_low_level' }, extra: { puma_env: env })
end
# note the below is just a Rack response
[500, {}, ["An error has occurred and reported in the system's low-level error handler."]]
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