---
title: Roda instrumentation
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/instrumented-gems/roda-instrumentation
---

The [New Relic Ruby agent](https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/new-relic-ruby) automatically instruments [Roda](https://roda.jeremyevans.net/) 3.19.0 and higher.

> #### ⚠️ IMPORTANT
>
> Roda instrumentation requires Ruby agent version 9.4.0 or higher.

## Getting started

To set up your Roda app with New Relic:

1.  Add the `newrelic_rpm` gem to Gemfile and bundle.
    ```ruby
    gem 'newrelic_rpm'
    ```
2.  In your Roda app, below the Roda `require` directive, add `require 'newrelic_rpm'`. For example:

    ```ruby
    require 'roda'
    require 'newrelic_rpm'

    class App < Roda
      route do |r|
        r.root do
          "Hello World!"
        end
      end
    end
    ```

## Ignoring routes

Ruby agent versions 9.6.0 or higher support ignoring certain routes. To specify these values, use the same style of routes that you use to define your Roda application. For example, to ignore a `hello_world` route in a Roda app, declare `newrelic_ignore '/hello_word'` outside the `route` block:

```ruby
newrelic_ignore '/hello_world'

route do |r|
  r.on '/hello_world' do
    "Hello World!"
  end
end
```

If you want an entire application to be ignored (for example, in a mounted application), call `newrelic_ignore` without parameters:

```ruby
newrelic_ignore
```

Additionally, `newrelic_ignore_apdex` and `newrelic_ignore_enduser` are supported.

-   The `newrelic_ignore_apdex` call will exclude a given route from consideration in overall Apdex calculations.
-   The `newrelic_ignore_enduser` call will prevent automatic injection of the page load timing JavaScript when a route is rendered.

> #### ⚠️ IMPORTANT
>
> All newrelic_ignore\* methods must be called outside the `route` block.

## Rack instrumentation

As a Rack-based framework, Roda instrumentation requires Rack instrumentation to work properly. Rack instrumentation is enabled by default.
