Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us {<kbd>Check out our open positions</kbd>}[https://sentry.io/careers/]
Sentry
SDK for Ruby¶ ↑
| current version | build | coverage | downloads | semver stability | | — | —– | ——– | ——— | —————- | | |
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
|
Migrate From sentry-raven¶ ↑
The old sentry-raven
client has entered maintenance mode and was moved to {here}[https://github.com/getsentry/sentry-ruby/tree/master/sentry-raven].
If you're using sentry-raven
, we recommend you to migrate to this new SDK. You can find the benefits of migrating and how to do it in our migration guide.
Requirements¶ ↑
We test on Ruby 2.4, 2.5, 2.6, 2.7, and 3.0 at the latest patchlevel/teeny version. We also support JRuby 9.0.
If you use self-hosted Sentry
, please also make sure its version is above 20.6.0
.
Getting Started¶ ↑
Install¶ ↑
gem "sentry-ruby"
and depends on the integrations you want to have, you might also want to install these:
gem "sentry-rails" gem "sentry-sidekiq" gem "sentry-delayed_job" gem "sentry-resque"
Configuration¶ ↑
You can use Sentry.init
to initialize and configure your SDK:
Sentry.init do |config| config.dsn = "MY_DSN" end
To learn more about available configuration options, please visit the official documentation.
Performance Monitoring¶ ↑
You can activate performance monitoring by enabling traces sampling:
Sentry.init do |config| # set a uniform sample rate between 0.0 and 1.0 config.traces_sample_rate = 0.2 # you can also use traces_sampler for more fine-grained sampling # please click the link below to learn more end
To learn more about sampling transactions, please visit the official documentation.