Skip to content

activerabbit-ai/activerabbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

534 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActiveRabbit Dashboard

Website Gem Version NPM Version License

DocumentationFeaturesGet StartedSDKsMission


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.rbEvent.ingest_error
Issue model app/models/issue.rbfind_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

WebsiteDocsTwitter

About

AI-based error tracking and performance monitoring

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors