Skip to content

Commit

Permalink
Avoid INFO logspew from the Sentry gem.
Browse files Browse the repository at this point in the history
The Sentry gem spams stdout with INFO logs like this by default, which
is particularly annoying when troubleshooting. We don't need info-level
logs from the Sentry integration itself.

    [Transport] Sending envelope with items [sessions]  to Sentry

This change doesn't affect the logging of events to Sentry, only the
logging of messages from the Sentry gem itself. We're therefore only
interested in log messages which might indicate that something is wrong,
not log messages that simply indicate that something expected is
happening - hence WARN is the appropriate level here.
  • Loading branch information
sengi committed Oct 21, 2022
1 parent e535986 commit 88e2e5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/govuk_app_config/govuk_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def self.configure

Sentry.init do |sentry_config|
config = Configuration.new(sentry_config)
# Avoid "Sending envelope with items ... to Sentry" logspew on stdout.
config.logger.level = Sentry::Logger::WARN
yield config if block_given?
end
end
Expand Down

0 comments on commit 88e2e5a

Please sign in to comment.