Skip to content

activerabbit-ai/activerabbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

490 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ActiveRabbit Dashboard

Website Gem Version NPM Version License

Documentation β€’ Features β€’ Get Started β€’ SDKs β€’ Mission


ActiveRabbit: AI-Powered Application Monitoring for Rails & Beyond

ActiveRabbit is the intelligent monitoring platform built for modern Ruby on Rails developers. We combine comprehensive error tracking, performance monitoring, and AI-powered insights to help you ship with confidence. Stop debugging in the darkβ€”let AI explain your errors and suggest fixes.

At a high level, ActiveRabbit provides:

We designed ActiveRabbit to be dead-simple to integrateβ€”just a few lines of code and you're monitoring.

Read more about our features, SDKs, and mission below, and get started at https://www.activerabbit.ai today!


Table of Contents


Get Started

Cloud (Fastest Way!)

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

Ruby on Rails

# Gemfile
gem 'activerabbit-ai'
# 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

npm install @activerabbit/nextjs
// 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>
  )
}

Features

Dashboard: See Everything at a Glance

Get a bird's-eye view of your application's health with our real-time dashboard. Track error rates, performance metrics, and trendsβ€”all in one beautiful interface.

  • Real-time Error Counts: See errors as they happen
  • Performance Overview: P50, P95, P99 response times at a glance
  • Trend Analysis: Spot regressions before they become incidents
  • Multi-Project Support: Monitor all your apps from one place

ActiveRabbit Dashboard


Error Monitoring: Catch Every Bug

Comprehensive error tracking with detailed context, stack traces, and automatic grouping. Never miss a bug again.

  • Automatic Exception Capture: Rails, Sidekiq, and custom errors
  • Smart Error Grouping: Reduce noise by grouping similar errors
  • Rich Context: Request data, user info, environment details
  • Stack Trace Navigation: Jump directly to the problematic code
  • Customizable Alerts: Slack, email, webhooksβ€”get notified your way

Error Monitoring


Performance Monitoring: Optimize with Confidence

Track application performance across your entire stack. Identify slow endpoints, database bottlenecks, and N+1 queries automatically.

  • Request Tracing: See exactly where time is spent
  • N+1 Query Detection: Automatically catch database anti-patterns
  • Slow Query Alerts: Get notified when queries exceed thresholds
  • Percentile Metrics: P50, P95, P99 tracking for accurate insights
  • Trend Analysis: Compare performance across deploys

Performance Monitoring


AI-Powered Insights: Understand Errors Instantly

This is what sets ActiveRabbit apart. Our AI analyzes every error and provides:

  • Plain-English Explanations: Understand what went wrong without diving deep into code
  • Root Cause Analysis: AI identifies the likely cause of the error
  • Fix Suggestions: Get actionable recommendations to resolve issues
  • Pattern Recognition: AI spots recurring issues and anti-patterns
  • Context-Aware: AI considers your stack trace, request data, and environment

AI-Powered Error Explanation

πŸ’‘ Example: Instead of just seeing NoMethodError: undefined method 'name' for nil:NilClass, ActiveRabbit AI tells you: "This error occurs because user is nil when trying to access name. This typically happens when a database query returns no results. Consider adding a nil check or using &.name (safe navigation operator)."


SDKs

Platform Package Status
Ruby on Rails activerabbit-ai βœ… Stable
Next.js @activerabbit/nextjs βœ… Stable
Node.js @activerabbit/node 🚧 Coming Soon
Python/Django activerabbit-python 🚧 Coming Soon

Ruby SDK Features

# Automatic error tracking - just works!
# Manual 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' })

What Gets Tracked Automatically

Category What's Tracked
Errors StandardError, NoMethodError, ActiveRecord::*, ActionController::*, and 20+ more
Performance Controller actions, database queries, view renders, background jobs
Database N+1 queries, slow queries, connection issues
Background Jobs Sidekiq jobs, ActiveJob, failures and retries

Self-Hosted

Deploy ActiveRabbit on your own infrastructure with Docker:

git clone https://github.com/activerabbit/activerabbit
cd activerabbit
docker-compose up -d

After setup, access the dashboard at http://localhost:3000.

Requirements:

  • Docker & Docker Compose
  • PostgreSQL
  • Redis
  • 4GB+ RAM recommended

See our Self-Hosted Guide for detailed instructions.


Development Setup

Prerequisites

  • Ruby 3.2.3+
  • PostgreSQL
  • Redis
  • Node.js (for asset compilation)

Quick Start

# Clone and install
git clone https://github.com/activerabbit/activerabbit
cd activerabbit
bundle install

# Setup environment
cp .env.example .env
# Edit .env with your settings

# Setup database
rails db:create db:migrate

# Start all services
bin/dev

Docker Development

# First-time setup
./bin/docker-setup

# Start all services
docker-compose up

# Or run in background
docker-compose up -d

Helper Scripts

Script Description
bin/dev Start development server with all services
bin/docker-setup First-time Docker setup
bin/docker-dev Start Docker development environment
bin/docker-console Open Rails console in Docker
bin/docker-reset Reset entire Docker environment

Ports

Service Port
Web Application http://localhost:3000
Sidekiq Dashboard http://localhost:3000/sidekiq
PostgreSQL localhost:5432
Redis localhost:6380

Tech Stack

Component Technology
Framework Ruby on Rails 8.2
Database PostgreSQL
Cache/Jobs Redis, Sidekiq
Authentication Devise
Payments Stripe (Pay gem)
UI Tailwind CSS
Security Rack::Attack
HTTP Client Faraday
Metrics HDRHistogram

Our Mission

Our mission is to help Ruby developers ship faster and debug less. We believe:

  1. Monitoring should be effortless β€” Integration should take minutes, not days
  2. Errors should be understandable β€” AI can bridge the gap between stack traces and solutions
  3. Performance matters β€” Slow apps lose users; we help you stay fast
  4. Rails deserves great tooling β€” The Ruby ecosystem deserves modern monitoring

Our Values

πŸ”“ We build in the open

ActiveRabbit is designed with transparency in mind. Our roadmap, decisions, and codebase reflect our commitment to the community.

🎯 We build a cohesive product

Error tracking, performance monitoring, and AI insights aren't separate productsβ€”they're one unified experience. Every feature is designed to work seamlessly together.

πŸ’Ž We build for Rails developers

We're Rails developers ourselves. We understand the ecosystem, the patterns, and the pain points. ActiveRabbit is built by Rails devs, for Rails devs.

πŸ€– We embrace AI thoughtfully

AI isn't a gimmickβ€”it's a tool that genuinely helps you debug faster. Our AI features are practical, accurate, and designed to save you time.


Documentation


Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Running Tests

# Run all tests
bundle exec rspec

# Run specific test
bundle exec rspec spec/models/user_spec.rb

# Run with coverage
COVERAGE=true bundle exec rspec

Architecture β€” Full Error Flow

How errors travel from your app to the ActiveRabbit dashboard.

YOUR RAILS APP                          ACTIVERABBIT PLATFORM
─────────────                          ────────────────────

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Rails App + Gem     β”‚
β”‚  activerabbit-ai     β”‚
β”‚                      β”‚
β”‚  ErrorCaptureMiddle- β”‚    POST /api/v1/events/errors
β”‚  ware intercepts     │──────────────────────────────────┐
β”‚  unhandled exceptionsβ”‚    POST /api/v1/events/batch     β”‚
β”‚                      β”‚    Header: X-Project-Token       β”‚
β”‚  ExceptionTracker    β”‚                                  β”‚
β”‚  builds payload:     β”‚                                  β”‚
β”‚  β€’ exception_class   β”‚                                  β”‚
β”‚  β€’ message           β”‚                                  β”‚
β”‚  β€’ backtrace         β”‚                                  β”‚
β”‚  β€’ structured_stack  β”‚                                  β”‚
β”‚  β€’ request context   β”‚                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                  β”‚
                                                          β–Ό
                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                  β”‚  API Layer                        β”‚
                                  β”‚  Api::V1::EventsController        β”‚
                                  β”‚                                   β”‚
                                  β”‚  1. authenticate_api_token!       β”‚
                                  β”‚     β†’ Validate X-Project-Token    β”‚
                                  β”‚     β†’ Set tenant (ActsAsTenant)   β”‚
                                  β”‚                                   β”‚
                                  β”‚  2. sanitize_error_payload()      β”‚
                                  β”‚  3. validate_error_payload!()     β”‚
                                  β”‚  4. Filter self-monitoring events β”‚
                                  β”‚                                   β”‚
                                  β”‚  5. Sidekiq::Client.push_bulk     β”‚
                                  β”‚     β†’ Enqueue ErrorIngestJob      β”‚
                                  β”‚                                   β”‚
                                  β”‚  Returns: 201 Created             β”‚
                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                 β”‚
                                                 β”‚ Sidekiq (async)
                                                 β–Ό
                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                  β”‚  ErrorIngestJob                   β”‚
                                  β”‚                                   β”‚
                                  β”‚  Event.ingest_error()             β”‚
                                  β”‚                                   β”‚
                                  β”‚  β”Œβ”€ Fingerprinting ────────────┐  β”‚
                                  β”‚  β”‚ SHA256(exception_class       β”‚  β”‚
                                  β”‚  β”‚      + top_frame             β”‚  β”‚
                                  β”‚  β”‚      + controller_action)    β”‚  β”‚
                                  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                                  β”‚                                   β”‚
                                  β”‚  Issue.find_or_create_by_         β”‚
                                  β”‚        fingerprint()              β”‚
                                  β”‚  β”Œβ”€ Existing β†’ increment count   β”‚
                                  β”‚  β”‚            update last_seen_at β”‚
                                  β”‚  β”‚            reopen if closed    β”‚
                                  β”‚  └─ New β†’ create, status="open"  β”‚
                                  β”‚                                   β”‚
                                  β”‚  Create Event record              β”‚
                                  β”‚  Detect N+1 queries               β”‚
                                  β”‚  Generate AI summary (new only)   β”‚
                                  β”‚  Check should_alert_for_issue?()  β”‚
                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                 β”‚
                                                 β”‚ if alert needed
                                                 β–Ό
                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                  β”‚  IssueAlertJob                    β”‚
                                  β”‚                                   β”‚
                                  β”‚  Rate limiting (Redis SET NX)     β”‚
                                  β”‚  Per-fingerprint dedup            β”‚
                                  β”‚  Respect user preferences         β”‚
                                  β”‚  β†’ immediate / every_30_min / etc β”‚
                                  β”‚                                   β”‚
                                  β”‚  Find matching AlertRules         β”‚
                                  β”‚  Enqueue AlertJob per rule        β”‚
                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                 β”‚
                                                 β–Ό
                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                  β”‚  AlertJob                         β”‚
                                  β”‚                                   β”‚
                                  β”‚  Create AlertNotification record  β”‚
                                  β”‚  Dispatch to channels:            β”‚
                                  β”‚                                   β”‚
                                  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”  β”‚
                                  β”‚  β”‚ Slack  β”‚ β”‚ Email β”‚ β”‚Webhookβ”‚  β”‚
                                  β”‚  β”‚Web API β”‚ β”‚Resend β”‚ β”‚ URL   β”‚  β”‚
                                  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Model

Event (individual occurrence)
  β”‚  exception_class, message, backtrace
  β”‚  context, occurred_at, structured_stack_trace
  β”‚
  └──▢ Issue (grouped by fingerprint)
         β”‚  fingerprint, exception_class, top_frame
         β”‚  controller_action, count, status
         β”‚  first_seen_at, last_seen_at, is_job_failure
         β”‚
         └──▢ AlertRule (per-project thresholds)
                β”‚  alert_type: error_frequency | new_issue |
                β”‚              performance_regression | n_plus_one
                β”‚  threshold_value, time_window_minutes, cooldown_minutes
                β”‚
                └──▢ AlertNotification (delivery log)
                       notification_type: slack / email
                       status: pending / sent / failed

Alert Conditions

Trigger Condition
New issue First occurrence (count == 1)
Reopened Was closed, now recurring
High frequency >10 occurrences in last hour
Performance P95 latency exceeds threshold
N+1 detected Repeated query pattern found

Key Files

Layer File
Client SDK activerabbit-ai/lib/active_rabbit/middleware/error_capture_middleware.rb
Client HTTP activerabbit-ai/lib/active_rabbit/client/http_client.rb
API endpoint app/controllers/api/v1/events_controller.rb
Auth app/controllers/concerns/api_authentication.rb
Error ingest app/jobs/error_ingest_job.rb
Alert check app/jobs/issue_alert_job.rb
Alert deliver app/jobs/alert_job.rb
Event model app/models/event.rb β†’ Event.ingest_error
Issue model app/models/issue.rb β†’ find_or_create_by_fingerprint
Slack app/services/slack_notification_service.rb
Email app/mailers/alert_mailer.rb
Display app/controllers/errors_controller.rb

License

This project is licensed under the MIT License - see the LICENCE file for details.


Built with ❀️ for the Ruby community

Website β€’ Docs β€’ Twitter

About

AI-based error tracking and performance monitoring

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •