-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
sentry-raven 0.4.8 not working after bundle update #104
Comments
Just tried this on my own production Rails app with edge sentry-raven, and I can't reproduce. Does running "Raven.capture { 1 / 0 }" in the console send an error to Sentry? also, Raven.client.configuration.send_in_current_environment? should return true. if it doesn't, it means your environment settings are wrong. |
I can positively say that there's a regression in 0.4.8. We we very surprised (in a bad way) to find out that exceptions are no longer delivered. We downgraded to 0.4.6 and now things are back to normal. I'm going to do a diff 0.4.6 and 0.4.8 and see if I notice anything suspicious. We're using passenger+nginx on Engine Yard btw. Couldn't reproduce locally with thin (with RAILS_ENV=production, of course). |
Raven.capture is catching but nor sending in the console. sentry-raven-0.4.8 irb(main):001:0> Raven.capture { 1 / 0 }
ZeroDivisionError: divided by 0
from org/jruby/RubyFixnum.java:547:in `/'
from (irb):1:in `evaluate'
from org/jruby/RubyProc.java:249:in `call'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.8/lib/raven.rb:89:in `capture'
from (irb):1:in `evaluate'
from org/jruby/RubyKernel.java:1066:in `eval'
from org/jruby/RubyKernel.java:1392:in `loop'
from org/jruby/RubyKernel.java:1174:in `catch'
from org/jruby/RubyKernel.java:1174:in `catch'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in `start'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in `start'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands.rb:41:in `(root)'
from org/jruby/RubyKernel.java:1027:in `require'
from script/rails:6:in `(root)' raven-sentry-0.4.5 irb(main):007:0> Raven.capture { 1 / 0 }
NameError: undefined local variable or method `logger' for #<Raven::Client:0x409335e1>
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven/client.rb:36:in `send'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven.rb:75:in `send'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven.rb:108:in `capture_exception'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven.rb:92:in `capture'
from (irb):7:in `evaluate'
from org/jruby/RubyKernel.java:1066:in `eval'
from org/jruby/RubyKernel.java:1392:in `loop'
from org/jruby/RubyKernel.java:1174:in `catch'
from org/jruby/RubyKernel.java:1174:in `catch'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in `start'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in `start'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands.rb:41:in `(root)'
from org/jruby/RubyKernel.java:1027:in `require'
from script/rails:6:in `(root)'
irb(main):006:0> Rails.logger = Logger.new(STDOUT)
=> #<Logger:0xc36a6d1 @logdev=#<Logger::LogDevice:0x5801e99a @filename=nil, @shift_age=nil, @dev=#<IO:fd 1>, @mutex=#<Logger::LogDevice::LogDeviceMutex:0x658faa99 @mon_count=0, @mon_mutex=#<Mutex:0x3b0956e6>, @mon_owner=nil>, @shift_size=nil>, @formatter=#<Logger::SimpleFormatter:0x62283451 @datetime_format=nil>, @progname=nil, @default_formatter=#<Logger::Formatter:0x3d82e42f @datetime_format=nil>, @level=0>
irb(main):007:0> Raven.capture { 1 / 0 }
NameError: undefined local variable or method `logger' for #<Raven::Client:0x409335e1>
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven/client.rb:36:in `send'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven.rb:75:in `send'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven.rb:108:in `capture_exception'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/sentry-raven-0.4.5/lib/raven.rb:92:in `capture'
from (irb):7:in `evaluate'
from org/jruby/RubyKernel.java:1066:in `eval'
from org/jruby/RubyKernel.java:1392:in `loop'
from org/jruby/RubyKernel.java:1174:in `catch'
from org/jruby/RubyKernel.java:1174:in `catch'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands/console.rb:47:in `start'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands/console.rb:8:in `start'
from /usr/local/rvm/gems/jruby-1.7.2@warbler/gems/railties-3.2.11/lib/rails/commands.rb:41:in `(root)'
from org/jruby/RubyKernel.java:1027:in `require'
from script/rails:6:in `(root)' And the environment settings are right in both gemsets: irb(main):003:0> Raven.client.configuration.send_in_current_environment?
=> true |
IIRC correctly I added more logging. This could be an issue with the logger On Thursday, May 30, 2013, ljromero wrote:
David Cramer |
I'm also experiencing this issue. |
7ecb853 is the cuprit, investigating |
Actually that's not entirely true. I'm unable to reproduce still. Please confirm that Raven.client.configuration.send_in_current_environment? is true, and you've bound a logger that has DEBUG logging enabled:
|
Improved logging in 0ae36c2 so it has a sane default |
We've a standard Rails logger (the level is set to INFO). |
@romanbsd it will output something if logging is configured. So if it just shows the traceback logging must not be configured correctly. If it is outputting something, can you paste the cleaned result here? |
I have
|
Are you sure that the production environment is configured to send to Sentry? |
There were some changes in 0.4.8 around this that enable it in more situations, so it seems like that wouldn't affect it: |
@dcramer It wasn't outputting anything. We reverted to 0.4.6 and now things are back to normal. |
This was the problem here, it was fixed in this commit: If the send failed, the rescue block was using |
Why did the send fail every time, then? Not even a single exception was reported. |
@romanbsd I can't explain that unless the server was throttling you (but you'd see a log message) Either way, 100% of the time in the current release there are log messages if logging is configured at the appropriate levels |
I think something has gone wrong in Sentry 0.4.8 SSL verification settings. I had to set |
@marcomorain going to look into our SSL default (it might not be applying), but regarding capture_rack_exception, I believe that was deleted. It probably shouldn't have been, but basically now you can just do Raven.capture_exception, and if you have the Rack middleware installed, it always has the rack context |
I think I've fixed the SSL verification issue with 4efeeb5 |
Env:
rails 3.2.11
sentry-raven 0.4.8
sentry server 5.4.5
We are testing a production environment.
Sentry-raven not caching or sending exceptions after server errors.
sentry-raven 0.4.8
Completed 500 Internal Server Error in 1111ms
sentry-raven 0.4.5
Completed 500 Internal Server Error in 1111ms
** [Raven] Sending event 4055553156e548d589acca7ca6c57dd8 to Sentry
** [Raven] Raven HTTP Transport connecting to http://blablabla.local:9000
The text was updated successfully, but these errors were encountered: