# Sinatra Error and Performance Monitoring

> Find bugs & optimize the performance of your Sinatra app with performance monitoring. Get started with Sinatra error monitoring for free here.

**URL:** https://sentry.io/for/sinatra/

---

**Documentation:** [https://docs.sentry.io/platforms/ruby/](https://docs.sentry.io/platforms/ruby/)

## Install

Grab the [Sentry Ruby SDK](https://github.com/getsentry/raven-ruby):

```ruby
gem "sentry-ruby"
```

Configure your DSN:

```ruby
require 'sentry-ruby'

Sentry.init do |config|
  config.dsn = 'https://<key>@sentry.io/<project>'
  config.breadcrumbs_logger = [:sentry_logger, :http_logger]

  # To activate Tracing, set one of these options.
  # We recommend adjusting the value in production:
  config.traces_sample_rate = 1.0
  # or
  config.traces_sampler = lambda do |context|
    0.5
  end
end
```

See the [Sinatra docs](https://docs.sentry.io/platforms/ruby/) for full setup options.

## Features

### Sinatra Performance Monitoring

Quickly identify Sinatra [performance](/for/performance/) issues and view full end-to-end distributed trace to see the exact, poor-performing API call and surface any related errors.

### Sinatra Monitoring with Complete Stack Traces

Take advantage of built-in integrations with Rails, Sidekiq, DelayedJob, and more of your favorite RubyGems. Enable asynchronous reporting so errors are logged quickly in a background job. Filter and group Sinatra exceptions intuitively to eliminate noise.

### Fill In The Blanks About Sinatra Errors

Expose important events that led to each Sinatra exception: a string to label where the event took place, message, timestamp. Learn in which version a bug first appeared, merge duplicates, and know if things regress in a future release.

---

*Source: [sentry.io/for/sinatra/](https://sentry.io/for/sinatra/)*
