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

Update 0.2.4 -> 0.2.6 causes build errors on Heroku #37

Closed
oskargargas opened this issue Nov 9, 2023 · 5 comments
Closed

Update 0.2.4 -> 0.2.6 causes build errors on Heroku #37

oskargargas opened this issue Nov 9, 2023 · 5 comments

Comments

@oskargargas
Copy link

Hi!

After updating logtail-rails to 0.2.6 I started experiencing build errors on Heroku (locally everything seams to work fine).
What might be misleading is that error is not directly related to logtails. Rather to Sentry gem which also uses ActiveSupport::BroadcastLogger and probably gets into some kind of loading priority problems.

Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
NameError: uninitialized constant ActiveSupport::BroadcastLogger (NameError)

         @logger = ::ActiveSupport::BroadcastLogger.new(*dupped_broadcasts)
                                  ^^^^^^^^^^^^^^^^^
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-rails-5.12.0/lib/sentry/rails/configuration.rb:17:in `block in <class:Configuration>'
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.12.0/lib/sentry/configuration.rb:608:in `instance_eval'
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.12.0/lib/sentry/configuration.rb:608:in `block in run_post_initialization_callbacks'
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.12.0/lib/sentry/configuration.rb:607:in `each'
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.12.0/lib/sentry/configuration.rb:607:in `run_post_initialization_callbacks'
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.12.0/lib/sentry/configuration.rb:353:in `initialize'
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.12.0/lib/sentry-ruby.rb:210:in `new'
/tmp/build_30e21af1/vendor/bundle/ruby/3.2.0/gems/sentry-ruby-5.12.0/lib/sentry-ruby.rb:210:in `init'
/tmp/build_30e21af1/config/initializers/sentry.rb:4:in `<main>'

logtail-rails was the only updated dependency at this point.

@oskargargas
Copy link
Author

Actually narrowed it to 0.2.4 -> 0.2.5

@curusarn
Copy link
Contributor

curusarn commented Nov 9, 2023

Hi @oskargargas,

Thank you for reporting this!

I've passed the issue to the team to take a look. I'll make sure to keep you updated here on GitHub.

Thanks for sharing logs and versions!

@PetrHeinz
Copy link
Contributor

Hello @oskargargas, and thanks again for reporting the issue! 🙌

However, the error triggers because sentry-ruby package doesn't check whether BroadcastLogger is defined before instantiating it in their code. I've proposed a fix in their code in getsentry/sentry-ruby#2169, but merging and releasing depends on their maintainers.

In the meantime, I would suggest either monkey-patching sentry-ruby (in a similar way as the PR suggests), upgrading your Rails to 7.1+, or using logtail-rails in v0.2.4 for the time being.


Since there's not much we can do about it from our side, I'm closing the issue.

Feel free to reopen it, if you have any more questions or an idea how to work around the issue from logtail-rails. 🙏

@PetrHeinz PetrHeinz closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
@PetrHeinz
Copy link
Contributor

Hello @oskargargas, my PR was merged into sentry-ruby and will be probably released in 5.14.0 in a matter of weeks.

Updating to it when it's released should resolve the issue you're having. 👍

@oskargargas
Copy link
Author

@PetrHeinz thanks for your help and information provided. Greatly appreciated!

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

3 participants