Skip to content

Commit

Permalink
RST-5502 removing ping and disabling tests for now (#1441)
Browse files Browse the repository at this point in the history
* This should ignore the puma error
  • Loading branch information
zaparka authored Jun 28, 2023
1 parent 37082f4 commit aff6785
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

config.ssl_options = {
hsts: { expires: 1.year, preload: true },
redirect: { exclude: ->(request) { return true if ((request.path =~ /ping|submissions/) != nil) } }
redirect: { exclude: ->(request) { return true if /ping|submissions/.match?(request.path) } }
}
config.force_ssl = true

Expand Down
10 changes: 9 additions & 1 deletion config/initializers/sentry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Sentry.init do |config|
config.dsn = Settings.sentry.dsn
config.breadcrumbs_logger = [:active_support_logger, :http_logger]

config.release = ENV.fetch('APPVERSION', 'unknown')

config.traces_sampler = lambda do |sampling_context|
Expand All @@ -12,4 +11,13 @@

transaction_name.in?(EXCLUDE_PATHS) ? 0.0 : 0.01
end

config.before_send = lambda do |event, hint|
# NOTE: hint[:exception] would be a String if you use async callback
if hint[:exception].is_a?(Puma::HttpParserError)
nil
else
event
end
end
end

0 comments on commit aff6785

Please sign in to comment.