---
title: Automatic instrumentation
description: Events the Honeybadger Ruby gem captures automatically from Rails, background jobs, and more for Honeybadger Insights.
url: https://docs.honeybadger.io/lib/ruby/insights/automatic-instrumentation/
---

[Honeybadger Insights](https://docs.honeybadger.io/guides/insights/) captures events from your Ruby application, including web requests, database queries, background jobs, and cache operations, and makes them available for querying, visualization, and [dashboards](https://docs.honeybadger.io/guides/dashboards/). In a Rails app, this gives you performance monitoring and observability out of the box without additional instrumentation libraries.

In Honeybadger Ruby gem v6.0+, Insights is enabled by default. If you’re using an older gem version (v5.11+), you’ll need to enable it manually in your `honeybadger.yml` configuration file:

```yaml
insights:
  enabled: true
```

## Event captures

Automatic instrumentation sends events from Rails, ActiveJob, Sidekiq, SolidQueue, Karafka, Net::HTTP, Puma, and more to Honeybadger, where they will be displayed in the [Insights](https://docs.honeybadger.io/guides/insights/) section of your project.

See the [Ruby event reference](https://docs.honeybadger.io/insights/event-types/ruby/) for every event the gem emits, with field schemas and types.

To find these events, filter by `event_type::str`. Here’s an example BadgerQL query that you can use:

```badgerql
fields @ts, @preview
| filter event_type::str == "perform.sidekiq"
| sort @ts
```

## Customizing Insights for a specific plugin

When Insights is active, all plugins are enabled if the required library is present. For example, if Sidekiq is present in your app, the Sidekiq plugin will be loaded. You can disable automatic Insights instrumentation for a specific plugin by adding a configuration like this:

```yaml
sidekiq:
  insights:
    enabled: false
```

This will only affect Insights-related data capture and not the error notification portion of the plugin.

Some plugins allow for an easy way to choose if you want to capture events, metrics, or both for a particular plugin. The following configuration options are available:

```yaml
rails:
  insights:
    events: true
    metrics: false
karafka:
  insights:
    events: true
    metrics: false
sidekiq:
  insights:
    events: true
    metrics: false
net_http:
  insights:
    events: true
    metrics: false
solid_queue:
  insights:
    events: true
    metrics: false
puma:
  insights:
    events: true
    metrics: false
autotuner:
  insights:
    events: true
    metrics: false
```

Event options are all true by default. It is recommened to turn off events for plugins that may be producing more data than you actually need. Metric data collection is false by default since most metrics can be calculated from events.

By default, the `net_http` plugin logs the domain name of any request as part of the event payload. You can enabling logging of the full URL by setting the following configuration:

```plaintext
net_http:
  insights:
    full_url: true
```

## Managing event volume

If some events are noisy or you’d like to reduce quota consumption:

* [Filtering events](https://docs.honeybadger.io/lib/ruby/insights/filtering-events/) — ignore specific event types, or inspect and halt events with a callback.
* [Sampling events](https://docs.honeybadger.io/lib/ruby/insights/sampling-events/) — send only a percentage of events.

## Sending your own events

Automatic instrumentation covers the libraries the gem knows about. To send your own application events, see [Sending custom events](https://docs.honeybadger.io/lib/ruby/insights/sending-events-to-insights/).

## Metrics

The Honeybadger Ruby gem does more than just send events when they occur in your app. You can also enable metric collection. Check out [Collecting and Reporting Metrics](https://docs.honeybadger.io/lib/ruby/insights/collecting-and-reporting-metrics/) for more information.

## Sending Rails logs to Insights

If you are already using the Rails logger to track events in your application, you can send those events to Insights by [using a structured logging gem](https://docs.honeybadger.io/guides/insights/integrations/ruby-and-rails).

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
