Skip to content

Change in Rails v8.1 breaks rails_semantic_logger/active_record/log_subscriber.rb #279

@nbeyer

Description

@nbeyer

After upgrading to Rails 8.1, I started seeing: Could not log "sql.active_record" event. NoMethodError: undefined method 'sql_runtime' for module ActiveRecord::RuntimeRegistry. I traced this back to this change in Rails: rails/rails@7d12071.

ActiveRecord::RuntimeRegistry seems to be considered an internal class, as its marked with :nodoc: comments. All of the methods moved. For example ActiveRecord::RuntimeRegistry.sql_runtime moved to ActiveRecord::RuntimeRegistry.stats.sql_runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions