Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on the test server, write ruby errors to cloudwatch and honeybadger #57662

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions dashboard/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,16 @@
# Set to :debug to see everything in the log.
config.log_level = :info

if CDO.running_web_application?
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = Logger::Formatter.new

# Log condensed lines to syslog for centralized logging.
config.lograge.enabled = true
config.lograge.formatter = Lograge::Formatters::Cee.new
require 'syslog/logger'
config.logger = Syslog::Logger.new 'dashboard', Syslog::LOG_LOCAL0
end
Comment on lines +78 to +87
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar logging config to other environments, but limited to running web app to make sure it does not get set in unit tests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 in particular, very similar to the config for production.rb


config.experiment_cache_time_seconds = 0
end
5 changes: 5 additions & 0 deletions dashboard/config/honeybadger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ breadcrumbs:
request:
filter_keys:
- "warden.user.user.key"

# report data to honeybadger on the test server. this will not happen in unit tests
# or ci because we unset the api key in those situations (see test.yml.erb).
test:
report_data: true
Comment on lines +14 to +15
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.