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

feat(ruby): Add note about RUN_AT_EXIT_HOOKS=1 for resque #12992

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions platform-includes/getting-started-config/ruby.resque.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
```ruby {"onboardingOptions": {"performance": "12-15", "profiling": "16-19"}}
require 'sentry-ruby'

Sentry.init do |config|
config.dsn = '___PUBLIC_DSN___'

# get breadcrumbs from logs
config.breadcrumbs_logger = [:sentry_logger, :http_logger]

# Add data like request headers and IP for users, if applicable;
# see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
config.send_default_pii = true

# enable tracing
# we recommend adjusting this value in production
config.traces_sample_rate = 1.0

# enable profiling
# this is relative to traces_sample_rate
config.profiles_sample_rate = 1.0
end
```

Sentry relies on the `at_exit` hook to flush all events before the process exits. To make sure none of your events are lost, additionally please set the following environment variable when you run Resque:

```bash
RUN_AT_EXIT_HOOKS=1 rake resque:workers
```