-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
Background worker doesn't work for classic Sinatra apps #1778
Comments
@sl0thentr0py This is a funny behavior that really puzzled me for a while 😂 |
We already had a support ticket for this, the following workaround works
Not ideal but it's just because of this funny business that sinatra does with |
Oh damn. How many support tickets do we have that could've been turned into issues 😂 |
Oh not too many so far, but yeah that's a good point that I could definitely document some of those in the open on github. Just need to be less lazy. Will keep in mind. :) |
Haha, I'm not blaming you! It's a fun issue to debug and a good way to learn Sinatra anyway. I just didn't expect that you are already aware of it. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
this is now documented https://docs.sentry.io/platforms/ruby/guides/rack/#without-rackup |
Issue Description
When being ran in classic mode and without
config.ru
(e.g.bundle exec ruby app.rb
), Sinatra apps will be initialized at the end of the Ruby script by aat_exit
callback. And that means that the SDK'sat_exit
callback will also be called:sentry-ruby/sentry-ruby/lib/sentry-ruby.rb
Lines 216 to 219 in 0f66522
So when
app.rb
is loaded, the SDK's background worker is also disabled 🙈 Therefore, no event will be sent by the SDK.Reproduction Steps
Script
Command
Expected Behavior
Errors will be reported.
Actual Behavior
Errors are not reported because the background worker is shut down unexpectedly.
Ruby Version
3.1.0
SDK Version
5.2.1 & master
Integration and Its Version
No response
Sentry Config
No response
The text was updated successfully, but these errors were encountered: