Skip to content

sentry-rails 5.23.0 ActiveRecord overhead #2595

Open
@bubiche

Description

@bubiche

Issue Description

sentry-rails 5.23.0 seems to make active record much slower.

Reproduction Steps

I monitor things with ScoutAPM.

  • My baseline is ruby 3.1.7 with YJIT off with sentry-rails 5.12.0, my rails application's ActiveRecord time for each request is ~13ms.
  • Upgrade to ruby 3.4.2 with YJIT on, ActiveRecord time for each request is ~10ms. sentry-rails is still at 5.12.0 so stacktrace doesn't work.
  • Upgrade sentry-rails to 5.23.0, ActiveRecord time for each request is ~15ms.

I have repeated this a few times and get similar results.

Expected Behavior

Sentry doesn't add too much overhead to my application's response time.

Actual Behavior

My response time is slower with sentry-rails 5.23.0

Ruby Version

3.4.2

SDK Version

5.23.0

Integration and Its Version

Rails

Sentry Config

Sentry.init do |config|
  config.dsn = ...
  config.breadcrumbs_logger = %i[active_support_logger http_logger]
  config.include_local_variables = true
  config.send_modules = false

  config.enabled_environments = %w[staging production]

  config.excluded_exceptions += %w[SystemExit] if [1, "1", "yes", true, "true"].include?(ENV["IS_JOBS"])
  config.excluded_exceptions += %w[Google::Cloud::AbortedError]

  config.release = ENV["RELEASE_VERSION"]
end

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions