Getting Started

    Get up and running with ActiveRabbit in under 5 minutes.

    The quickest way to get started is signing up at app.activerabbit.ai. After creating an account, integrate with just a few lines of code.

    Prerequisites

    • Ruby 3.2.3 or higher
    • Rails 7.0 or higher
    • An ActiveRabbit account (sign up for free)

    Ruby on Rails

    Add the ActiveRabbit gem to your Gemfile:

    # Gemfile
    gem 'activerabbit-ai'

    Then run bundle install:

    bundle install

    Create an initializer to configure ActiveRabbit:

    # config/initializers/activerabbit.rb
    ActiveRabbit::Client.configure do |config|
      config.api_key = ENV['ACTIVERABBIT_API_KEY']
      config.project_id = ENV['ACTIVERABBIT_PROJECT_ID']
      config.environment = Rails.env
    end

    That's it! 🎉 Errors, performance data, and N+1 queries are now being tracked automatically.

    Next.js / Node.js

    Install the npm package:

    npm install @activerabbit/nextjs

    Add the provider to your app layout:

    // app/layout.tsx or _app.tsx
    import { ActiveRabbitProvider } from '@activerabbit/nextjs'
    
    export default function RootLayout({ children }) {
      return (
        <ActiveRabbitProvider
          projectId={process.env.NEXT_PUBLIC_ACTIVERABBIT_PROJECT_ID}
          apiKey={process.env.ACTIVERABBIT_API_KEY}
        >
          {children}
        </ActiveRabbitProvider>
      )
    }

    What Gets Tracked Automatically

    CategoryWhat's Tracked
    ErrorsStandardError, NoMethodError, ActiveRecord::*, ActionController::*, and 20+ more
    PerformanceController actions, database queries, view renders, background jobs
    DatabaseN+1 queries, slow queries, connection issues
    Background JobsSidekiq jobs, ActiveJob, failures and retries

    Test Your Integration

    Verify that ActiveRabbit is configured correctly:

    # In rails console
    rails console
    
    # Manual error tracking when needed
    begin
      risky_operation
    rescue => e
      ActiveRabbit::Client.track_exception(e, context: { user_id: user.id })
      raise
    end
    
    # Performance monitoring
    ActiveRabbit::Client.performance_monitor.measure('heavy_operation') do
      perform_heavy_calculation
    end
    
    # Custom events
    ActiveRabbit::Client.track_event('user_signup', { plan: 'premium' })

    Next Steps

    💡 Pro Tip

    ActiveRabbit automatically captures unhandled exceptions in your Rails application. You don't need to add any additional code for basic error tracking to work.