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

Sentry ruby 5.17.0 having issue with railties-7.1.3.2 #2285

Open
nishant-vagh opened this issue Mar 29, 2024 · 1 comment
Open

Sentry ruby 5.17.0 having issue with railties-7.1.3.2 #2285

nishant-vagh opened this issue Mar 29, 2024 · 1 comment

Comments

@nishant-vagh
Copy link

Issue Description

Request that are processed correctly with 200 status code are converted to 500 because of incompatibility of 5.17.0

Reproduction Steps

Gemfile.lock
rails (7.1.3.2)
actioncable (= 7.1.3.2)
actionmailbox (= 7.1.3.2)
actionmailer (= 7.1.3.2)
actionpack (= 7.1.3.2)
actiontext (= 7.1.3.2)
actionview (= 7.1.3.2)
activejob (= 7.1.3.2)
activemodel (= 7.1.3.2)
activerecord (= 7.1.3.2)
activestorage (= 7.1.3.2)
activesupport (= 7.1.3.2)
bundler (>= 1.15.0)
railties (= 7.1.3.2)
sentry-rails (5.17.0)
railties (>= 5.0)
sentry-ruby (~> 5.17.0)
sentry-ruby (5.17.0)

Start rails server and hit any request.
The request will always return 500.
Rails console will show the result as 200 but still browser will show as 500 (Internal Server Error)

Expected Behavior

All API results should be 200 and sentry should not make it 500.

Actual Behavior

The API requests are return 500 even though rails console show 200 as processed request.
Issue is only with 5.17.0.
Everything is working perfect with 5.16.1

Ruby Version

3.2.2

SDK Version

5.17.0

Integration and Its Version

Rails - 7.1.3.2

Sentry Config

Sentry.init do |config|
config.dsn = Rails.application.credentials[:sentry_dsn]
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.enabled_environments = ['production', 'dev']

filter_parameters = Rails.application.config.filter_parameters + [:password, :authorization]
config.before_send = lambda do |event, hint|
# Iterate over the event hash and filter parameters
event_hash = event.to_hash
event_hash.transform_values! do |value|
if value.is_a?(Hash)
value.transform_keys! { |key| filter_parameters.include?(key.to_sym) ? "FILTERED" : key }
end
value
end

event_hash  # Return the filtered event hash

end

config.traces_sample_rate = 0.1
end

@st0012
Copy link
Collaborator

st0012 commented Mar 31, 2024

We fixed an issue in 5.17.1, can you let us know if that resolves the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

3 participants