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

question: why append RailsPerformance::Extensions to LogSubscriber instead of integrating with Rails notifications directly #31

Open
carlost opened this issue May 3, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@carlost
Copy link

carlost commented May 3, 2021

I installed rails_performance on a rails 6.x application and ran a number of page requests. "Recent Requests" included everything as expected. However, the trace info for every request via TraceReport data section was blank.

My rails application uses rails_semantic_logger, which replaces the default ActionView::LogSubscriber and ActiveRecord::LogSubscriber. This prevented rails_performance from tracking the logsubscriber events.

I was able to resolve this by appending the RailsPerformance::Extensions::Db module to the appropriate RailsSemanticLogger LogSubscriber class.

Since ActiveSupport::LogSubscriber is just a logger specific ActiveSupport::Notifications subscriber, why doesn't RailsPerformance just bypass the LogSubscriber altogether and use ActiveSupport::Notifications directly?

If RailsPerformance can use the Notifications directly, would you be comfortable accepting an outside PR?

@igorkasyanchuk
Copy link
Owner

Hello @carlost , can you prepare this PR? Sorry just don't have enough time handling all my projects

@igorkasyanchuk igorkasyanchuk added the help wanted Extra attention is needed label May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants