---
title: Sequel instrumentation
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/frameworks/sequel-instrumentation
---

If you are using [the Sequel database toolkit](https://github.com/jeremyevans/sequel) as your ORM for Ruby instrumentation, New Relic can provide some insight into your application's database usage.

## Setting up Sequel [#setup]

New Relic's Sequel instrumentation is implemented via a plugin for `Sequel::Models`, and an extension for `Sequel::Databases`. Every database handle that Sequel knows about when New Relic is loaded will automatically be instrumented, but if you're using a version of Sequel before 3.47.0, you'll need to add the extension yourself if you create any after the instrumentation is loaded:

```ruby
db = Sequel.connect( ... )
db.extension :newrelic_instrumentation
```

Versions after 3.47.0 use `Database.extension` to automatically install the extension for new connections.

## Disabling Sequel [#disable]

If you do not want your models or database connections to be instrumented, you can disable Sequel instrumentation by setting [`disable_sequel_instrumentation`](https://docs.newrelic.com/docs/agents/ruby-agent/installation-and-configuration/ruby-agent-configuration#disable_sequel_instrumentation) in `newrelic.yml` to `true`.
