Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Raven is a Ruby client for Sentry (getsentry.com)

Ruby

Merge pull request #321 from javawizard/tag-delayed-job-id

Include the delayed job id as a tag
latest commit 217b1db052
@nateberkopec nateberkopec authored

README.md

Raven-Ruby

Gem Version Build Status

A client and integration layer for the Sentry error reporting API.

Requirements

We test on Ruby MRI 1.8.7/REE, 1.9.3, 2.0, 2.1 and 2.2. JRuby support is experimental - check TravisCI to see if the build is passing or failing.

Getting Started

Install

gem "sentry-raven" #, :github => "getsentry/raven-ruby"

Set SENTRY_DSN

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

Call

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 Information

Full documentation and more information on advanced configuration, sending more information, scrubbing sensitive data, and more can be found on the wiki.

Something went wrong with that request. Please try again.