A summary of data about the Ruby ecosystem.

https://github.com/getsentry/raven-ruby

Raven is the legacy Ruby SDK for Sentry (getsentry.com) — replaced by sentry-ruby
https://github.com/getsentry/raven-ruby

Keywords

tag-archived

Keywords from Contributors

crash-reporting error-handler error-monitoring stacktrace tag-production team-web-backend tag-non-production activerecord mvc activejob

Last synced: about 12 hours ago
JSON representation

Repository metadata

Raven is the legacy Ruby SDK for Sentry (getsentry.com) — replaced by sentry-ruby

README.md

Raven-Ruby, the Ruby Client for Sentry

🚧 Migrating To The New SDK 🚧

We've released our new Ruby SDK, sentry-ruby. Here are the benefits of migrating to it:

  • Unified Interfaces With Other SDKs: The design of sentry-raven is outdated compared with our modern Sentry SDKs. If you also use other Sentry SDKs, such as Sentry's JavaScript SDK for your frontend application, you'll notice that their interfaces are quite different from the one provided for sentry-raven. The new sentry-ruby SDK provides a more consistent user experience across all different platforms.

  • Performance Monitoring: The Sentry Ruby SDK includes performance monitoring, which you can enable if you haven't already as (discussed here).

  • Future Support: sentry-raven has entered maintenance mode, which means it won't receive any new feature supports or aggressive bug fixes.

  • Better Extensibility: Unlike sentry-raven, sentry-ruby is built with extensibility in mind and will allow the community to build extensions for different integrations/features.

If you're interested in the migration, please also read our migration guide for more information.


Gem Version
Build Status
Coverage Status
Gem
SemVer

Documentation | Bug Tracker | Forum | IRC: irc.freenode.net, #sentry

The official Ruby-language client and integration layer for the Sentry error reporting API.

Requirements

We test on Ruby 2.3, 2.4, 2.5, 2.6 and 2.7 at the latest patchlevel/teeny version. We also support JRuby 9.0. Our Rails integration works with Rails 4.2+, including Rails 5 and Rails 6.

Getting Started

Install

gem "sentry-raven"

Raven only runs when Sentry DSN is set

Raven will capture and send exceptions to the Sentry server whenever its DSN is set. This makes environment-based configuration easy - if you don't want to send errors in a certain environment, just don't set the DSN in that environment!

# Set your SENTRY_DSN environment variable.
export SENTRY_DSN=http://public@example.com/project-id
# Or you can configure the client in the code.
Raven.configure do |config|
  config.dsn = 'http://public@example.com/project-id'
end

Raven doesn't report some kinds of data by default

Raven ignores some exceptions by default - most of these are related to 404s or controller actions not being found. For a complete list, see the IGNORE_DEFAULT constant.

Raven doesn't report POST data or cookies by default. In addition, it will attempt to remove any obviously sensitive data, such as credit card or Social Security numbers. For more information about how Sentry processes your data, check out the documentation on the processors config setting.

Usage

If you use Rails, you're already done - no more configuration required! Check Integrations for more details on other gems Sentry integrates with automatically.

Otherwise, Raven supports two methods of capturing exceptions:

Raven.capture do
  # capture any exceptions which happen during execution of this block
  1 / 0
end

begin
  1 / 0
rescue ZeroDivisionError => exception
  Raven.capture_exception(exception)
end

More configuration

You're all set - but there's a few more settings you may want to know about too!

async

When an error or message occurs, the notification is immediately sent to Sentry. Raven can be configured to send asynchronously:

config.async = lambda { |event|
  Thread.new { Raven.send_event(event) }
}

Using a thread to send events will be adequate for truly parallel Ruby platforms such as JRuby, though the benefit on MRI/CRuby will be limited. If the async callback raises an exception, Raven will attempt to send synchronously.

Note that the naive example implementation has a major drawback - it can create an infinite number of threads. We recommend creating a background job, using your background job processor, that will send Sentry notifications in the background.

config.async = lambda { |event| SentryJob.perform_later(event) }

class SentryJob < ActiveJob::Base
  queue_as :default

  def perform(event)
    Raven.send_event(event)
  end
end

transport_failure_callback

If Raven fails to send an event to Sentry for any reason (either the Sentry server has returned a 4XX or 5XX response), this Proc or lambda will be called.

config.transport_failure_callback = lambda { |event, error|
  AdminMailer.email_admins("Oh god, it's on fire because #{error.message}!", event).deliver_later
}

Context

Much of the usefulness of Sentry comes from additional context data with the events. Raven makes this very convenient by providing methods to set thread local context data that is then submitted automatically with all events:

Raven.user_context email: 'foo@example.com'

Raven.tags_context interesting: 'yes'

Raven.extra_context additional_info: 'foo'

You can also use tags_context and extra_context to provide scoped information:

Raven.tags_context(interesting: 'yes') do
  # the `interesting: 'yes'` tag will only present in the requests sent inside the block
  Raven.capture_exception(exception)
end

Raven.extra_context(additional_info: 'foo') do
  # same as above, the `additional_info` will only present in this request
  Raven.capture_exception(exception)
end

For more information, see Context.

More Information


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 1,398
Total Committers: 200
Avg Commits per committer: 6.99
Development Distribution Score (DDS): 0.707

Commits in past year: 1
Committers in past year: 1
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Nate Berkopec n****c@g****m 410
st0012 s****2@g****m 261
David Cramer d****r@g****m 181
Noah Kantrowitz n****h@c****t 70
Daniel Griesser d****6@g****m 31
dependabot[bot] 4****] 24
Olle Jonsson o****n@g****m 18
Vincent Brendel v****l@g****m 17
Sean Linsley x****v@g****m 11
David Cramer c****r@d****m 11
Grey Baker g****l@g****m 10
Armin Ronacher a****r@a****m 10
Eugene Kenny e****y@g****m 9
Matt Robenolt m****t@y****m 9
John Firebaugh j****h@g****m 8
Patricia M. Brent p****t@g****m 7
Tony Wooster + Joe Lencioni t****r@c****m 7
Brian Palmer b****p@i****m 6
Robert Park r****t@k****m 6
Derek Schneider s****k 6
Jonas Pfenniger j****s@p****e 6
Andrew c****w@s****g 6
Piotr Kuczynski p****i@h****m 5
Mathieu Rheaume m****u@c****m 5
Philip Corliss p****s@5****m 5
wdhorton w****n@g****m 5
Noah Silas n****h@c****m 4
Zachary Anker z****r@s****m 4
Kohei Suzuki k****i@c****m 4
Akira Matsuda r****e@d****p 4
and 170 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 3 months ago


Package metadata

gem.coop: sentry-raven

A gem that provides a client interface for the Sentry error logger

  • Homepage: https://github.com/getsentry/raven-ruby
  • Documentation: http://www.rubydoc.info/gems/sentry-raven/
  • Licenses: Apache-2.0
  • Latest release: 3.1.2 (published almost 5 years ago)
  • Last Synced: 2026-03-01T09:34:02.106Z (2 days ago)
  • Versions: 92
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 110,125,829 Total
  • Docker Downloads: 434,389,300
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 0.132%
    • Downloads: 0.225%
    • Docker downloads count: 0.303%
  • Maintainers (3)
rubygems.org: sentry-raven

A gem that provides a client interface for the Sentry error logger

gem.coop: mustwin-sentry-raven

A gem that provides a client interface for the Sentry error logger

  • Homepage: http://github.com/getsentry/raven-ruby
  • Documentation: http://www.rubydoc.info/gems/mustwin-sentry-raven/
  • Licenses: Apache-2.0
  • Latest release: 0.11.2 (published over 11 years ago)
  • Last Synced: 2026-02-28T06:01:28.783Z (4 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 3,710 Total
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 27.074%
    • Downloads: 81.222%
  • Maintainers (1)
rubygems.org: mustwin-sentry-raven

A gem that provides a client interface for the Sentry error logger

  • Homepage: http://github.com/getsentry/raven-ruby
  • Documentation: http://www.rubydoc.info/gems/mustwin-sentry-raven/
  • Licenses: Apache-2.0
  • Latest release: 0.11.2 (published over 11 years ago)
  • Last Synced: 2026-02-28T06:01:28.737Z (4 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 3,710 Total
  • Rankings:
    • Forks count: 1.15%
    • Stargazers count: 1.82%
    • Dependent packages count: 15.706%
    • Average: 29.847%
    • Dependent repos count: 46.782%
    • Downloads: 83.777%
  • Maintainers (1)
ubuntu-24.04: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Licenses:
  • Latest release: 3.1.2+ds-3 (published 25 days ago)
  • Last Synced: 2026-02-06T16:04:11.338Z (25 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-10: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Documentation: https://packages.debian.org/buster/ruby-sentry-raven
  • Licenses:
  • Latest release: 2.7.4-1 (published 20 days ago)
  • Last Synced: 2026-02-13T04:25:56.618Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Licenses:
  • Latest release: 3.1.2+ds-3 (published 21 days ago)
  • Last Synced: 2026-02-11T06:49:49.805Z (21 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Licenses:
  • Latest release: 2.13.0-1 (published 18 days ago)
  • Last Synced: 2026-02-13T07:22:49.732Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Licenses:
  • Latest release: 3.1.2+ds-3 (published 22 days ago)
  • Last Synced: 2026-02-09T17:18:05.371Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-11: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Documentation: https://packages.debian.org/bullseye/ruby-sentry-raven
  • Licenses:
  • Latest release: 3.0.0-2 (published 21 days ago)
  • Last Synced: 2026-02-13T08:24:43.558Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-22.04: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Licenses:
  • Latest release: 3.1.2+ds-3 (published 18 days ago)
  • Last Synced: 2026-02-13T13:25:52.878Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.10: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Licenses:
  • Latest release: 3.1.2+ds-3 (published 18 days ago)
  • Last Synced: 2026-02-13T18:32:46.756Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
debian-12: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Documentation: https://packages.debian.org/bookworm/ruby-sentry-raven
  • Licenses: apache-2.0
  • Latest release: 3.1.2+ds-3 (published 19 days ago)
  • Last Synced: 2026-02-12T23:41:37.509Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
debian-13: ruby-sentry-raven

  • Homepage: https://github.com/getsentry/raven-ruby
  • Documentation: https://packages.debian.org/trixie/ruby-sentry-raven
  • Licenses:
  • Latest release: 3.1.2+ds-3 (published 19 days ago)
  • Last Synced: 2026-02-13T13:19:32.133Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%

Score: -Infinity