Rails Error Dashboard
Self-hosted Rails error monitoring โ free, forever.
Own your errors. Own your stack. Zero monthly fees.
A fully open-source, self-hosted error dashboard for solo founders, indie hackers, and small teams who want complete control without the SaaS bills.
gem 'rails_error_dashboard'5-minute setup ยท Works out-of-the-box ยท 100% Rails + Postgres ยท No vendor lock-in
๐ Full Documentation ยท ๐ฎ Live Demo ยท ๐ RubyGems
๐ฎ Try the Live Demo
See it in action: https://rails-error-dashboard.anjan.dev
Username: gandalf ยท Password: youshallnotpass
Experience the full dashboard with 250+ realistic Rails errors, LOTR-themed demo data, and all features enabled.
โ ๏ธ BETA SOFTWARE
This Rails Engine is in beta and under active development. While functional and tested (935+ tests passing), the API may change before v1.0.0. Use in production at your own discretion.
Supports: Rails 7.0 - 8.0 (+ edge 8.1) | Ruby 3.2 - 3.4
๐ฏ Who This Is For
โ Solo bootstrappers who need professional error tracking without recurring costs
โ Indie SaaS founders building profitable apps on tight budgets
โ Small dev teams (2-5 people) who hate SaaS bloat
โ Privacy-conscious apps that need to keep error data on their own servers
โ Side projects that might become real businesses
๐ฐ What It Replaces
| Before | After |
|---|---|
| Pay $29-99/month for error monitoring | $0/month - runs on your existing Rails server |
| Send sensitive error data to third parties | Keep all data on your infrastructure |
| Fight with SaaS pricing tiers and limits | Unlimited errors, unlimited projects |
| Vendor lock-in with proprietary APIs | 100% open source, fully portable |
| Complex setup with SDKs and external services | 5-minute Rails Engine installation |
๐ Why Choose Rails Error Dashboard
"Install once, own it forever"
- โ Zero recurring costs - One-time setup, runs on your existing infrastructure
- โ 5-minute installation - Mount the Rails Engine, run migrations, done
- โ Works immediately - Automatic error capture from Rails controllers, jobs, models
- โ Beautiful UI - Professional dashboard you can show to clients
- โ Full control - Your data stays on your server, modify anything you want
- โ No surprises - Open source MIT license, no hidden fees or limits
Built for developers who:
- Want professional error monitoring without the SaaS tax
- Need to debug production issues without paying per error
- Value data privacy and server ownership
- Prefer simple, Rails-native solutions
โจ Features
Core Features (Always Enabled)
๐ฏ Complete Error Tracking
Automatic error capture from Rails controllers, jobs, and middleware. Frontend & mobile support for React, React Native, Vue, Angular, Flutter. Platform detection (iOS/Android/Web/API), user context tracking, full stack traces.
๐ Beautiful Dashboard
Modern Bootstrap 5 UI with dark/light mode, responsive design, real-time statistics, search and filtering, fast pagination. Overview dashboard with critical alerts, error trend charts, and platform health summary.
๐ Analytics & Insights
7-day trend charts, severity breakdown, spike detection, resolution rate tracking, user impact analysis. Comprehensive analytics page with hourly patterns, mobile vs API breakdowns, and top affected users.
๐ง Workflow Management
Error assignment and status tracking, priority levels (critical/high/medium/low), snooze functionality, comment threads, batch operations (bulk resolve/delete), resolution tracking with references.
๐ Security & Privacy
HTTP Basic Auth, environment-based settings, optional separate database for isolation. Your data stays on your server - no third-party access.
Optional Features (Choose During Install)
๐จ Multi-Channel Notifications
- Slack - Rich formatted messages with error context and direct dashboard links
- Email - HTML formatted alerts with full error details
- Discord - Embedded messages with severity color coding
- PagerDuty - Critical error escalation with incident management
- Webhooks - Custom integrations with any service (JSON payloads)
โก Performance Optimizations
- Async Logging - Non-blocking error capture using ActiveJob (Sidekiq/SolidQueue/Async)
- Error Sampling - Reduce storage by sampling high-frequency errors
- Backtrace Limiting - Save 70-90% storage with smart truncation
- Separate Database - Isolate error data for better performance
- Database Indexes - Composite indexes and PostgreSQL GIN full-text search
๐ง Advanced Analytics (7 Powerful Features)
1. Baseline Anomaly Alerts ๐ Automatically detect unusual error rate spikes using statistical analysis (mean + std dev). Get proactive notifications when errors exceed expected baselines with intelligent cooldown to avoid alert fatigue.
2. Fuzzy Error Matching ๐ Find similar errors across different error hashes using Jaccard similarity (70%) and Levenshtein distance (30%). Discover related errors that share common root causes even when they manifest differently.
3. Co-occurring Errors ๐ Detect errors that happen together within configurable time windows (default: 5 minutes). Identify patterns where one error frequently triggers another, helping you prioritize fixes.
4. Error Cascade Detection โ๏ธ Identify error chains (A causes B causes C) with probability calculations and average delays. Visualize parentโchild relationships to understand cascading failures and fix root causes.
5. Error Correlation Analysis ๐ Correlate errors with app versions, git commits, and users. Find problematic releases, identify users affected by multiple error types, and detect time-based patterns.
6. Platform Comparison ๐ฑ Compare iOS vs Android vs Web health metrics side-by-side. Platform-specific error rates, severity distributions, resolution times, and stability scores (0-100).
7. Occurrence Pattern Detection ๐ Detect cyclical patterns (business hours, nighttime, weekend rhythms) and error bursts (many errors in short time). Understand when and how your errors happen.
Plus: Developer Insights Dashboard ๐ก Built-in analytics dashboard with severity detection, platform stability scoring, actionable recommendations, and recent error activity summaries (always available, no configuration needed).
๐ Source Code Integration (NEW!)
View actual source code directly in error backtraces - no need to switch to your editor or GitHub.
- Inline Source Code Viewer - Click "View Source" on any error frame to see the actual code with ยฑ7 lines of context
- Git Blame Integration - See who last modified the code, when, and the commit message
- Repository Links - Jump directly to GitHub/GitLab/Bitbucket at the exact error line
- Smart Caching - Fast performance with 1-hour cache (configurable)
- Security Controls - Only shows your app code by default (not gems/frameworks)
Perfect for debugging:
- Understand the code context without leaving the dashboard
- Identify code ownership with git blame
- Quick navigation to your repository
- See recent changes that might have caused the error
# Enable in config/initializers/rails_error_dashboard.rb
config.enable_source_code_integration = true
config.source_code_context_lines = 7
config.enable_git_blame = true
config.git_repository_url = "https://github.com/user/repo"๐ Complete documentation โ
๐ Plugin System
Extensible architecture with event hooks (on_error_logged, on_error_resolved, on_threshold_exceeded). Built-in examples for Jira integration, metrics tracking, audit logging. Easy to create custom plugins - just drop a file in config/initializers/error_dashboard_plugins/.
๐ View complete feature list with examples โ
๐ฆ Quick Start
1. Add to Gemfile
gem 'rails_error_dashboard'2. Install with Interactive Setup
bundle install
rails generate rails_error_dashboard:install
rails db:migrateThe installer will guide you through optional feature selection:
- Notifications (Slack, Email, Discord, PagerDuty, Webhooks)
- Performance (Async Logging, Error Sampling, Separate Database)
- Advanced Analytics (7 powerful features including baseline alerts, fuzzy matching, platform comparison)
All features are opt-in - choose what you need during installation, or enable/disable them later in the initializer.
This will:
- Create
config/initializers/rails_error_dashboard.rbwith your selected features - Copy database migrations
- Mount the engine at
/error_dashboard
3. Visit your dashboard
Start your server and visit:
http://localhost:3000/error_dashboard
Default credentials:
- Username:
gandalf - Password:
youshallnotpass
โ ๏ธ Change these before production! Edit config/initializers/rails_error_dashboard.rb
4. Test it out
Trigger a test error to see it in action:
# In Rails console or any controller
raise "Test error from Rails Error Dashboard!"The error will appear instantly in your dashboard with full context, backtrace, and platform information.
๐ Full installation guide โ
๐๏ธ Uninstalling
Need to remove Rails Error Dashboard? We've made it simple with both automated and manual options:
# Automated uninstall (recommended)
rails generate rails_error_dashboard:uninstall
# Keep error data, remove code
rails generate rails_error_dashboard:uninstall --keep-data
# Show manual instructions only
rails generate rails_error_dashboard:uninstall --manual-onlyThe uninstaller will:
- โ Show exactly what will be removed
- โ Ask for confirmation before making changes
- โ Remove initializer, routes, and migrations
- โ Optionally drop database tables (with double confirmation)
- โ Provide clear next steps
๐ Complete uninstall guide โ
โ๏ธ Configuration
Opt-in Feature System
Rails Error Dashboard uses an opt-in architecture - core features (error capture, dashboard UI, analytics) are always enabled, while everything else is disabled by default.
Tier 1 Features (Always ON):
- โ Error capture (controllers, jobs, middleware)
- โ Dashboard UI with search and filtering
- โ Real-time updates
- โ Analytics and trend charts
Optional Features (Choose During Install):
- ๐ง Multi-channel notifications (Slack, Email, Discord, PagerDuty, Webhooks)
- โก Performance optimizations (Async logging, Error sampling)
- ๐ Advanced analytics (Baseline alerts, Fuzzy matching, Platform comparison, and more)
Basic Configuration
Edit config/initializers/rails_error_dashboard.rb:
RailsErrorDashboard.configure do |config|
# ============================================================================
# AUTHENTICATION (Always Required)
# ============================================================================
config.dashboard_username = ENV.fetch('ERROR_DASHBOARD_USER', 'gandalf')
config.dashboard_password = ENV.fetch('ERROR_DASHBOARD_PASSWORD', 'youshallnotpass')
# ============================================================================
# OPTIONAL FEATURES (Enable as needed)
# ============================================================================
# Slack notifications (if enabled during install)
config.enable_slack_notifications = true
config.slack_webhook_url = ENV['SLACK_WEBHOOK_URL']
# Email notifications (if enabled during install)
config.enable_email_notifications = true
config.notification_email_recipients = ["dev@yourapp.com"]
config.notification_email_from = "errors@yourapp.com"
# Async logging for better performance (if enabled during install)
config.async_logging = true
config.async_adapter = :sidekiq # or :solid_queue, :async
# Advanced analytics features (if enabled during install)
config.enable_baseline_alerts = true
config.enable_similar_errors = true
config.enable_platform_comparison = true
endAll features can be toggled on/off at any time by editing the initializer.
Environment Variables
# .env
ERROR_DASHBOARD_USER=your_username
ERROR_DASHBOARD_PASSWORD=your_secure_password
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
DASHBOARD_BASE_URL=https://yourapp.com๐ Complete configuration guide โ
๐ข Multi-App Support
Rails Error Dashboard supports logging errors from multiple Rails applications to a single shared database.
This is ideal for:
- Managing errors across microservices
- Monitoring production, staging, and development environments separately
- Tracking different apps from a central dashboard
- Organizations running multiple Rails applications
Automatic Configuration
By default, the dashboard automatically detects your application name from Rails.application.class.module_parent_name:
# BlogApp::Application โ "BlogApp"
# AdminPanel::Application โ "AdminPanel"
# ApiService::Application โ "ApiService"No configuration needed! Each app will automatically register itself when logging its first error.
Manual Override
Override the auto-detected name if desired:
# config/initializers/rails_error_dashboard.rb
RailsErrorDashboard.configure do |config|
config.application_name = "MyCustomAppName"
endOr use an environment variable:
# .env
APPLICATION_NAME="Production API"This allows you to use different names for different environments:
# Production
APPLICATION_NAME="MyApp-Production"
# Staging
APPLICATION_NAME="MyApp-Staging"
# Development
APPLICATION_NAME="MyApp-Development"Shared Database Setup
All apps must use the same error dashboard database. Configure your database.yml:
# config/database.yml
production:
primary:
database: my_app_production
# ... other connection settings
error_dashboard:
database: shared_error_dashboard_production
host: error-db.example.com
# ... other connection settingsThen in your initializer:
# config/initializers/rails_error_dashboard.rb
RailsErrorDashboard.configure do |config|
config.database = :error_dashboard # Use the shared database
endDashboard UI Features
Navbar Application Switcher:
- Quick dropdown to switch between applications
- Shows "All Apps" by default
- Only appears when multiple apps are registered
Filter Form:
- Filter errors by specific application
- Combine with other filters (error type, platform, etc.)
- Active filter pills show current selection
Application Column:
- Displays application name for each error
- Only shown when viewing "All Apps"
- Hidden when filtered to a single app
Per-App Error Tracking
Errors are tracked independently per application:
# Same error in different apps creates separate records
# App A: StandardError "Database timeout" โ Error #1
# App B: StandardError "Database timeout" โ Error #2
# Each has its own:
# - Occurrence counts
# - Resolution status
# - Comments and history
# - Analytics and trendsAPI Usage
When logging errors via API, specify the application:
RailsErrorDashboard::Commands::LogError.call(
error_type: "TypeError",
message: "Cannot read property 'name' of null",
platform: "iOS",
# ... other parameters
)
# Uses config.application_name automaticallyOr override per-error (advanced):
# Create application first
app = RailsErrorDashboard::Application.find_or_create_by!(name: "Mobile App")
# Then create error
RailsErrorDashboard::ErrorLog.create!(
application: app,
error_type: "NetworkError",
message: "Request failed",
# ... other fields
)Performance & Concurrency
Multi-app support is designed for high-concurrency scenarios:
โ
Row-level locking - No table locks, apps write independently
โ
Cached lookups - Application names cached for 1 hour
โ
Composite indexes - Fast filtering on [application_id, occurred_at]
โ
Per-app deduplication - Same error in different apps tracked separately
โ
No deadlocks - Scoped locking prevents cross-app conflicts
Benchmark: Tested with 5 apps writing 1000 errors/sec with zero deadlocks.
Rake Tasks
Manage applications via rake tasks:
# List all registered applications
rails error_dashboard:list_applications
# Backfill application for existing errors
rails error_dashboard:backfill_application APP_NAME="Legacy App"Migration Guide
If you have existing errors before enabling multi-app support:
- Run migrations:
rails db:migrate - Backfill existing errors:
rails error_dashboard:backfill_application APP_NAME="My App" - All existing errors will be assigned to "My App"
- New applications will auto-register on first error
Zero downtime - Errors can continue logging during migration.
๐ Usage
Automatic Error Tracking
Rails Error Dashboard automatically tracks errors from:
- Controllers (via Rails error reporting)
- Background jobs (ActiveJob, Sidekiq)
- Rack middleware (catches everything else)
No additional code needed! Just install and it works.
Manual Error Logging
For frontend/mobile apps or custom error logging:
# From your Rails API
RailsErrorDashboard::Commands::LogError.call(
error_type: "TypeError",
message: "Cannot read property 'name' of null",
backtrace: ["App.js:42", "index.js:12"],
platform: "iOS",
app_version: "2.1.0",
user_id: current_user.id,
context: {
component: "ProfileScreen",
device_model: "iPhone 14 Pro"
}
)Frontend Integration
// React Native example
try {
// Your code
} catch (error) {
fetch('https://yourapp.com/api/errors', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
error_type: error.name,
message: error.message,
backtrace: error.stack.split('\n'),
platform: Platform.OS, // 'ios' or 'android'
app_version: VERSION
})
});
}๐ฑ Mobile app integration guide โ
๐ Notifications
Set up multi-channel notifications in minutes:
Slack
config.enable_slack_notifications = true
config.slack_webhook_url = ENV['SLACK_WEBHOOK_URL']Discord
config.enable_discord_notifications = true
config.discord_webhook_url = ENV['DISCORD_WEBHOOK_URL']PagerDuty (Critical Errors Only)
config.enable_pagerduty_notifications = true
config.pagerduty_integration_key = ENV['PAGERDUTY_INTEGRATION_KEY']Custom Webhooks
config.enable_webhook_notifications = true
config.webhook_urls = ['https://yourapp.com/hooks/errors']๐ Notification setup guide โ
๐ Documentation
Getting Started
- Quickstart Guide - Complete 5-minute setup
- Configuration - All configuration options
- Mobile App Integration - React Native, Flutter, etc.
Features
- Complete Feature List - Every feature explained
- Notifications - Multi-channel alerting
- Batch Operations - Bulk resolve/delete
- Real-Time Updates - Live dashboard
- Error Trend Visualizations - Charts & analytics
Advanced
- Multi-App Support - Track multiple applications
- Plugin System - Build custom integrations
- API Reference - Complete API documentation
- Customization Guide - Customize everything
- Database Options - Separate database setup
- Database Optimization - Performance tuning
Development
- Testing - Multi-version testing
- Smoke Tests - Deployment verification tests
๐ View all documentation โ
๐๏ธ Architecture
Built with Service Objects + CQRS Principles:
- Commands: LogError, ResolveError, BatchOperations (write operations)
- Queries: ErrorsList, DashboardStats, Analytics (read operations)
- Value Objects: ErrorContext (immutable data)
- Services: PlatformDetector, SimilarityCalculator (business logic)
- Plugins: Event-driven extensibility
Clean, maintainable, testable architecture you can understand and modify.
๐ค Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Write tests for your changes
- Ensure all tests pass (
bundle exec rspec) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
git clone https://github.com/AnjanJ/rails_error_dashboard.git
cd rails_error_dashboard
# Automated setup (installs deps, hooks, runs tests)
bin/setup
# Or manual setup
bundle install
bundle exec lefthook install # Installs git hooks
bundle exec rspecGit Hooks: We use Lefthook to run quality checks before commit/push. This ensures CI passes and saves GitHub Actions minutes!
๐ง Development guide โ | ๐งช Testing guide โ
๐ License
Rails Error Dashboard is available as open source under the terms of the MIT License.
๐ Acknowledgments
- Built with Rails
- UI powered by Bootstrap 5
- Charts by Chart.js
- Pagination by Pagy
- Platform detection by Browser gem
โ Frequently Asked Questions
This is currently in beta but actively tested with 935+ passing tests across Rails 7.0-8.0 and Ruby 3.2-3.4. Many users are running it in production. See production requirements.
Similar: Error tracking, grouping, notifications, dashboards Better: 100% free, self-hosted (your data stays with you), no usage limits, Rails-optimized Trade-offs: You manage hosting/backups, fewer integrations than commercial services
See full comparison.
Minimal with async logging enabled:
- Synchronous: ~10-50ms per error (blocks request)
- Async (recommended): ~1-2ms (queues to background job)
- Sampling: Log only 10% of non-critical errors for high-traffic apps
See Performance Guide.
Yes! Configure in your initializer:
RailsErrorDashboard.configure do |config|
config.database = :errors # Use separate database
end- Install Rails Error Dashboard
- Run both systems in parallel (1-2 weeks)
- Verify all errors are captured
- Remove old error tracking gem
- Update team documentation
Historical data cannot be imported (different formats).
Yes! The error logging works in API-only mode. The dashboard UI requires a browser but can be:
- Mounted in a separate admin app
- Run in a separate Rails instance pointing to the same database
- Accessed via SSH tunnel
See API-only setup.
Automatic! Just set APP_NAME environment variable:
# App 1
APP_NAME=my-api rails server
# App 2
APP_NAME=my-admin rails serverAll apps share the same dashboard. See Multi-App Guide.
Yes! Configure custom rules in your initializer:
RailsErrorDashboard.configure do |config|
config.custom_severity_rules = {
/ActiveRecord::RecordNotFound/ => :low,
/Stripe::/ => :critical
}
endSee Customization Guide.
Forever by default (no automatic deletion). Manual cleanup with rake task:
# Delete resolved errors older than 90 days
rails error_dashboard:cleanup_resolved DAYS=90
# Filter by application name
rails error_dashboard:cleanup_resolved DAYS=30 APP_NAME="My App"Or schedule with cron/whenever. See Database Optimization.
Yes! Enable during installation or configure manually:
RailsErrorDashboard.configure do |config|
config.enable_slack_notifications = true
config.slack_webhook_url = ENV['SLACK_WEBHOOK_URL']
endSupports Slack, Discord, Email, PagerDuty, and custom webhooks. See Notifications Guide.
Yes! Includes Turbo Streams support for real-time updates. Errors appear in the dashboard instantly without page refresh.
Make HTTP POST requests to your Rails API:
// React Native example
fetch('https://api.example.com/error_dashboard/api/v1/errors', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic ' + btoa('admin:password')
},
body: JSON.stringify({
error_class: 'TypeError',
message: 'Cannot read property...',
platform: 'iOS'
})
});Yes! Use the plugin system:
class MyCustomPlugin < RailsErrorDashboard::Plugin
def on_error_logged(error_log)
# Your custom logic
end
end
RailsErrorDashboard::PluginRegistry.register(MyCustomPlugin.new)See Plugin System Guide.
- ๐ Read the docs: docs/README.md
- ๐ Report bugs: GitHub Issues
- ๐ก Ask questions: GitHub Discussions
- ๐ Security issues: See SECURITY.md
๐ฌ Support
- ๐ Documentation: docs/
- ๐ Issues: GitHub Issues
- ๐ก Discussions: GitHub Discussions
๐ Contributors
Thank you to everyone who has contributed to Rails Error Dashboard!
Special thanks to:
- @bonniesimon - Turbo helpers production fix
- @gundestrup - Security fixes, dependency updates, CI/CD improvements
See CONTRIBUTORS.md for the complete list of contributors and their contributions.
Want to contribute? Check out our Contributing Guide!
Made with โค๏ธ by Anjan for the Rails community
One Gem to rule them all, One Gem to find them, One Gem to bring them all, and in the dashboard bind them. ๐งโโ๏ธ