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

ArgumentError with server_timing enabled in Rails 7.0 #54

Open
adamstegman opened this issue Sep 22, 2022 · 0 comments
Open

ArgumentError with server_timing enabled in Rails 7.0 #54

adamstegman opened this issue Sep 22, 2022 · 0 comments

Comments

@adamstegman
Copy link

adamstegman commented Sep 22, 2022

With config.server_timing = true in config/environments/development.rb, this gem causes errors when publishing the n_plus_one_query event. It looks like the server timing middleware creates an ActiveSupport::Notifications::Event from the arguments but it expects a different set. I'm not very familiar with this functionality so I'm not sure what the disconnect is.

Stack trace:

ActionView::Template::Error (wrong number of arguments (given 2, expected 5)):
activesupport (7.0.3.1) lib/active_support/notifications/instrumenter.rb:62:in `initialize'
actionpack (7.0.3.1) lib/action_dispatch/middleware/server_timing.rb:16:in `new'
actionpack (7.0.3.1) lib/action_dispatch/middleware/server_timing.rb:16:in `block in call'
activesupport (7.0.3.1) lib/active_support/notifications/fanout.rb:225:in `publish'
activesupport (7.0.3.1) lib/active_support/notifications/fanout.rb:80:in `block in publish'
activesupport (7.0.3.1) lib/active_support/notifications/fanout.rb:91:in `block in iterate_guarding_exceptions'
activesupport (7.0.3.1) lib/active_support/notifications/fanout.rb:90:in `each'
activesupport (7.0.3.1) lib/active_support/notifications/fanout.rb:90:in `iterate_guarding_exceptions'
activesupport (7.0.3.1) lib/active_support/notifications/fanout.rb:80:in `publish'
activesupport (7.0.3.1) lib/active_support/notifications.rb:197:in `publish'
jit_preloader (2.0.0) lib/jit_preloader/active_record/associations/collection_association.rb:23:in `block in load_target'
jit_preloader (2.0.0) lib/jit_preloader/active_record/associations/collection_association.rb:13:in `tap'
jit_preloader (2.0.0) lib/jit_preloader/active_record/associations/collection_association.rb:13:in `load_target'
activerecord (7.0.3.1) lib/active_record/associations/collection_proxy.rb:43:in `load_target'
activerecord (7.0.3.1) lib/active_record/associations/collection_proxy.rb:1007:in `records'
activerecord (7.0.3.1) lib/active_record/relation/delegation.rb:88:in `each'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant