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
- Host: GitHub
- URL: https://github.com/getsentry/raven-ruby
- Owner: getsentry
- License: apache-2.0
- Archived: true
- Created: 2025-09-17T13:47:33.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-09-18T09:40:37.000Z (6 months ago)
- Last Synced: 2026-02-14T20:53:10.092Z (17 days ago)
- Topics: tag-archived
- Language: Ruby
- Homepage:
- Size: 2.08 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
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-ravenis 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 forsentry-raven. The newsentry-rubySDK 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-ravenhas entered maintenance mode, which means it won't receive any new feature supports or aggressive bug fixes. -
Better Extensibility: Unlike
sentry-raven,sentry-rubyis 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.
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
- Name: Sentry
- Login: getsentry
- Email: support@sentry.io
- Kind: organization
- Description: Real-time crash reporting for your web apps, mobile apps, and games.
- Website: https://sentry.io
- Location: United States of America
- Twitter: getsentry
- Company:
- Icon url: https://avatars.githubusercontent.com/u/1396951?v=4
- Repositories: 696
- Last ynced at: 2025-10-19T07:22:08.795Z
- Profile URL: https://github.com/getsentry
GitHub Events
Total
- Member event: 1
Last Year
- Member event: 1
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 | 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:
- squareup.com: 5
- sentry.io: 3
- causes.com: 3
- swrve.com: 3
- instructure.com: 2
- digitalocean.com: 1
- makandra.de: 1
- brunogarcia.com: 1
- darrennix.com: 1
- ksylvest.com: 1
- sonix.asia: 1
- saffitz.com: 1
- experteer.com: 1
- duh.se: 1
- relexsolutions.com: 1
- iain.nl: 1
- katherinehouse.com: 1
- clearfit.com: 1
- janraasch.com: 1
- zieglers.ca: 1
- tenhundfeld.org: 1
- airbnb.com: 1
- zweitag.de: 1
- prograils.com: 1
- coderanger.net: 1
- dropbox.com: 1
- active-4.com: 1
- ydekproductions.com: 1
- kakaolab.com: 1
- pfenniger.name: 1
- seomoz.org: 1
- here.com: 1
- codingrhemes.com: 1
- 50projects.com: 1
- cookpad.com: 1
- dio.jp: 1
- asu.edu: 1
- iprog.com: 1
- triceimaging.com: 1
- vangberg.name: 1
- cobychapple.com: 1
- fidelitylife.com: 1
- sendgrid.com: 1
- toyland.org: 1
- cpan.org: 1
- bzdury.pl: 1
- 5stops.com: 1
- edariedl.cz: 1
- me.com: 1
- kanwisher.com: 1
- avant.com: 1
- whiskeyandgrits.net: 1
- stripe.com: 1
- bretthoerner.com: 1
- fiverr.com: 1
- keithpitt.com: 1
- jordanneill.com: 1
- jonmast.com: 1
- brusman.se: 1
- expectedbehavior.com: 1
- wyatt.co: 1
- elliterate.com: 1
- betterment.com: 1
- stillhope.com: 1
- kurioscreative.com: 1
- gavinmogan.com: 1
- clearbit.com: 1
- digital.justice.gov.uk: 1
- lookout.com: 1
- getsentry.com: 1
- robindaugherty.net: 1
- r8y.org: 1
- micubiculo.com: 1
- solnica.online: 1
- starkast.net: 1
- veilleperso.com: 1
- hackberry.dev: 1
- bigcommerce.com: 1
- unterwaditzer.net: 1
- kenhub.com: 1
- squirly.ca: 1
- moonsphere.net: 1
- rationalmeans.com: 1
- sija.pl: 1
- ruby-code.com: 1
- ogrady.ie: 1
- ertw.com: 1
- sap.com: 1
Issue and Pull Request metadata
Last synced: 3 months ago
Package metadata
- Total packages: 14
-
Total downloads:
- rubygems: 220,258,405 total
- Total docker downloads: 868,778,600
- Total dependent packages: 71 (may contain duplicates)
- Total dependent repositories: 3,890 (may contain duplicates)
- Total versions: 196
- Total maintainers: 4
- Total advisories: 1
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
- 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-01T03:04:29.736Z (3 days ago)
- Versions: 92
- Dependent Packages: 71
- Dependent Repositories: 3,890
- Downloads: 110,125,156 Total
- Docker Downloads: 434,389,300
-
Rankings:
- Downloads: 0.175%
- Docker downloads count: 0.356%
- Dependent packages count: 0.404%
- Dependent repos count: 0.506%
- Average: 0.778%
- Forks count: 1.249%
- Stargazers count: 1.978%
- Maintainers (3)
- Advisories:
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)
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%
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