Integrations

Sentry provides additional integrations designed to change configuration or add instrumentation to your application.

The Sentry SDK uses integrations to hook into the functionality of popular frameworks and libraries to automatically instrument your application and give you the best data out of the box.

Some of our integrations are available as separate gems while others are available as patches that can be enabled from the sentry-ruby gem. You can find an overview of all available integrations below.

The following table lists all integrations available as gems.

Simply add the relevant gems to your Gemfile and run bundle install to install them.

IntegrationGemfile
ruby.rails iconRailsgem "sentry-rails"
ruby.sidekiq iconSidekiqgem "sentry-sidekiq"
ruby.delayed_job iconDelayed Jobgem "sentry-delayed_job"
ruby.resque iconResquegem "sentry-resque"
ruby.opentelemetry iconOpenTelemetrygem "sentry-opentelemetry"

The following table lists all integrations available as patches and which ones are enabled by default.

You can use config.enabled_patches to enable or disable them.

Copied
# enable :faraday patch
config.enabled_patches << :faraday

# disable :puma patch
config.enabled_patches.delete(:puma)
PatchAuto-enabled
:http
:redis
:puma
:faraday
:graphql

The Rails integration is a feature rich integration that:

  • captures Errors anywhere in your Rails application
  • creates Transactions for incoming HTTP Requests
  • records Spans in those Transactions for various important operations like:
    • database queries (performed with activerecord)
    • view renders

The various Queue integrations for Sidekiq, Delayed Job and Resque create distributed traces connecting tasks that are performed in the background asynchronously.

The Rails integration also includes this functionality for ActiveJob.

The OpenTelemetry integration is used for exporting spans instrumented by an OpenTelemetry SDK into Sentry. See the OpenTelemetry Setup instructions for more details.

Outgoing HTTP Requests are instrumented as Spans by the :http (for requests done with Net::HTTP) and :faraday patches.

GraphQL operations are instrumented as Spans by the :graphql patch.

The :puma patch captures low level exceptions outside your application stack.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").