sentry-ruby icon indicating copy to clipboard operation
sentry-ruby copied to clipboard

Sentry not working on staging environment

Open vladCovaliov opened this issue 13 years ago • 5 comments

I think I found a bug. On the readme it says "By default events will be sent to Sentry in all environments except 'test', 'development', and 'cucumber'. "

On my app, I needed to explicitly specify the staging environment, for raven to work. Something like this:

config.environments = %w[ production staging ]

Maybe you need to fix, either the readMe or the gem :p

Have a nice day!

vladCovaliov avatar May 04 '13 14:05 vladCovaliov

Hmmm... are you sure? I can't reproduce this.

Can you run

Raven.capture { 1 / 0 }

in your staging environment? Does that send an error to Sentry?

Also, is this a Rails or Rack app?

nateberkopec avatar May 05 '13 16:05 nateberkopec

It's a rails app.

I am quite sure. I just tested this again. One controller method, a route to the controller's method, in that method I added Raven.capture { 1 / 0 } . When I access that page, the error 500 page is showing up, but no sentry ( on the staging environment of course, without explicitly adding staging to the environments).

If I add the 'staging' in the initializers/raven.rb

config.environments = %w[ production staging ]

The same error is delivered :)

To reproduce the bug, I think you can easily create a heroku staging app , I think is not a big deal :)

vladCovaliov avatar May 07 '13 06:05 vladCovaliov

Vlad can you confirm that you're on the latest version of the Gem?

On Monday, May 6, 2013 at 11:17 PM, Vlad Covaliov wrote:

It's a rails app. I am quite sure. I just tested this again. One controller method, a route to the controller's method, in that method I added Raven.capture { 1 / 0 } . When I access that page, the error 500 page is showing up, but no sentry ( on the staging environment of course, without explicitly adding staging to the environments).
If I add the 'staging' in the initializers/raven.rb config.environments = %w[ production staging ] The same error is delivered :) To reproduce the bug, I think you can easily create a heroku staging app , I think is not a big deal :)

— Reply to this email directly or view it on GitHub (https://github.com/getsentry/raven-ruby/issues/92#issuecomment-17525205).

dcramer avatar May 07 '13 06:05 dcramer

Nope :), I'm actually on 0.4.5 , is this the cause?

vladCovaliov avatar May 07 '13 06:05 vladCovaliov

Ya the change to make it run on all environments was more recent

On Monday, May 6, 2013 at 11:20 PM, Vlad Covaliov wrote:

Nope :), I'm actually on 0.4.5 , is this the cause?

— Reply to this email directly or view it on GitHub (https://github.com/getsentry/raven-ruby/issues/92#issuecomment-17525275).

dcramer avatar May 07 '13 06:05 dcramer