rails_error_dashboard 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/rails_error_dashboard/errors/show.html.erb +5 -5
- data/config/initializers/rails_error_dashboard.rb +172 -0
- data/db/migrate/20251230075315_cleanup_orphaned_migrations.rb +4 -0
- data/lib/generators/rails_error_dashboard/install/install_generator.rb +1 -1
- data/lib/rails_error_dashboard/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0be193c8efc5a3a6e1a5ea10196b987dad5d3a00fd69fd9ead8ed8f0c8e4e33c
|
|
4
|
+
data.tar.gz: 7dd591b0299ff74146b5f8863a82613bc8e8648a07e9c90de572d1ead637cda2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a313aee0a1163997bc07ccab988c1f103276149d8cba3130be243196bb7ffab040e846dce8f914f923a4f70809157e7bf45bfaeb5b5005eaa6543c587a413a75
|
|
7
|
+
data.tar.gz: e5a1237da3bc791415fee438d556d88a167c08e3d02ceec3aa1f4b02675852303ea5362b804da13780fd1dbd628b2c12a29af1d9d402af19630aed1f18f8b07e
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
<% if RailsErrorDashboard.configuration.enable_similar_errors && @error.respond_to?(:similar_errors) %>
|
|
179
179
|
<% similar = @error.similar_errors(threshold: 0.6, limit: 5) %>
|
|
180
180
|
<% if similar.any? %>
|
|
181
|
-
<% cache [@error, 'similar_errors_v1', similar.
|
|
181
|
+
<% cache [@error, 'similar_errors_v1', similar.map { |s| s[:error]&.updated_at }.compact.max] do %>
|
|
182
182
|
<div class="card mb-4">
|
|
183
183
|
<div class="card-header bg-white">
|
|
184
184
|
<h5 class="mb-0">
|
|
@@ -809,19 +809,19 @@
|
|
|
809
809
|
</div>
|
|
810
810
|
</div>
|
|
811
811
|
|
|
812
|
-
<% if baseline.mean && baseline.std_dev %>
|
|
812
|
+
<% if baseline.respond_to?(:mean) && baseline.mean && baseline.respond_to?(:std_dev) && baseline.std_dev %>
|
|
813
813
|
<div class="mt-2">
|
|
814
814
|
<small class="text-muted">
|
|
815
|
-
Threshold (2σ): <strong><%= baseline.threshold(sensitivity: 2)&.round(1) %></strong>
|
|
815
|
+
Threshold (2σ): <strong><%= baseline.respond_to?(:threshold) ? baseline.threshold(sensitivity: 2)&.round(1) : 'N/A' %></strong>
|
|
816
816
|
</small>
|
|
817
817
|
</div>
|
|
818
818
|
<% end %>
|
|
819
819
|
|
|
820
820
|
<div class="mt-2">
|
|
821
821
|
<small class="text-muted">
|
|
822
|
-
Sample: <%= baseline.sample_size %> periods
|
|
822
|
+
Sample: <%= baseline.respond_to?(:sample_size) ? baseline.sample_size : 'N/A' %> periods
|
|
823
823
|
<span class="text-muted">|</span>
|
|
824
|
-
Updated: <%= baseline.updated_at&.strftime("%m/%d %I:%M%p") %>
|
|
824
|
+
Updated: <%= baseline.respond_to?(:updated_at) ? baseline.updated_at&.strftime("%m/%d %I:%M%p") : 'N/A' %>
|
|
825
825
|
</small>
|
|
826
826
|
</div>
|
|
827
827
|
</div>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
RailsErrorDashboard.configure do |config|
|
|
4
|
+
# ============================================================================
|
|
5
|
+
# AUTHENTICATION (Always Required)
|
|
6
|
+
# ============================================================================
|
|
7
|
+
|
|
8
|
+
# Dashboard authentication credentials
|
|
9
|
+
# ⚠️ CHANGE THESE BEFORE PRODUCTION! ⚠️
|
|
10
|
+
config.dashboard_username = ENV.fetch("ERROR_DASHBOARD_USER", "gandalf")
|
|
11
|
+
config.dashboard_password = ENV.fetch("ERROR_DASHBOARD_PASSWORD", "youshallnotpass")
|
|
12
|
+
|
|
13
|
+
# Require authentication for dashboard access
|
|
14
|
+
config.require_authentication = true
|
|
15
|
+
|
|
16
|
+
# Require authentication even in development mode
|
|
17
|
+
config.require_authentication_in_development = false
|
|
18
|
+
|
|
19
|
+
# ============================================================================
|
|
20
|
+
# CORE FEATURES (Always Enabled)
|
|
21
|
+
# ============================================================================
|
|
22
|
+
|
|
23
|
+
# Error capture via middleware and Rails.error subscriber
|
|
24
|
+
config.enable_middleware = true
|
|
25
|
+
config.enable_error_subscriber = true
|
|
26
|
+
|
|
27
|
+
# User model for error associations
|
|
28
|
+
config.user_model = "User"
|
|
29
|
+
|
|
30
|
+
# Error retention policy (days to keep errors before auto-deletion)
|
|
31
|
+
config.retention_days = 90
|
|
32
|
+
|
|
33
|
+
# ============================================================================
|
|
34
|
+
# NOTIFICATION SETTINGS
|
|
35
|
+
# ============================================================================
|
|
36
|
+
# Configure which notification channels you want to use.
|
|
37
|
+
# You can enable/disable any of these at any time by changing true/false.
|
|
38
|
+
|
|
39
|
+
# Slack Notifications - DISABLED
|
|
40
|
+
# To enable: Set config.enable_slack_notifications = true and configure webhook URL
|
|
41
|
+
config.enable_slack_notifications = false
|
|
42
|
+
# config.slack_webhook_url = ENV["SLACK_WEBHOOK_URL"]
|
|
43
|
+
|
|
44
|
+
# Email Notifications - DISABLED
|
|
45
|
+
# To enable: Set config.enable_email_notifications = true and configure recipients
|
|
46
|
+
config.enable_email_notifications = false
|
|
47
|
+
# config.notification_email_recipients = ENV.fetch("ERROR_NOTIFICATION_EMAILS", "").split(",").map(&:strip)
|
|
48
|
+
# config.notification_email_from = ENV.fetch("ERROR_NOTIFICATION_FROM", "errors@example.com")
|
|
49
|
+
|
|
50
|
+
# Discord Notifications - DISABLED
|
|
51
|
+
# To enable: Set config.enable_discord_notifications = true and configure webhook URL
|
|
52
|
+
config.enable_discord_notifications = false
|
|
53
|
+
# config.discord_webhook_url = ENV["DISCORD_WEBHOOK_URL"]
|
|
54
|
+
|
|
55
|
+
# PagerDuty Integration - DISABLED
|
|
56
|
+
# To enable: Set config.enable_pagerduty_notifications = true and configure integration key
|
|
57
|
+
config.enable_pagerduty_notifications = false
|
|
58
|
+
# config.pagerduty_integration_key = ENV["PAGERDUTY_INTEGRATION_KEY"]
|
|
59
|
+
|
|
60
|
+
# Generic Webhook Notifications - DISABLED
|
|
61
|
+
# To enable: Set config.enable_webhook_notifications = true and configure webhook URLs
|
|
62
|
+
config.enable_webhook_notifications = false
|
|
63
|
+
# config.webhook_urls = ENV.fetch("WEBHOOK_URLS", "").split(",").map(&:strip).reject(&:empty?)
|
|
64
|
+
|
|
65
|
+
# Dashboard base URL (used in notification links)
|
|
66
|
+
config.dashboard_base_url = ENV["DASHBOARD_BASE_URL"]
|
|
67
|
+
|
|
68
|
+
# ============================================================================
|
|
69
|
+
# PERFORMANCE & SCALABILITY
|
|
70
|
+
# ============================================================================
|
|
71
|
+
|
|
72
|
+
# Async Error Logging - DISABLED
|
|
73
|
+
# Errors are logged synchronously (blocking)
|
|
74
|
+
# To enable: Set config.async_logging = true and configure adapter
|
|
75
|
+
config.async_logging = false
|
|
76
|
+
# config.async_adapter = :sidekiq # Options: :sidekiq, :solid_queue, :async
|
|
77
|
+
|
|
78
|
+
# Backtrace size limiting (reduces storage by ~80%)
|
|
79
|
+
config.max_backtrace_lines = 50
|
|
80
|
+
|
|
81
|
+
# Error Sampling - DISABLED
|
|
82
|
+
# All errors are logged (100% sampling rate)
|
|
83
|
+
# To enable: Set config.sampling_rate < 1.0 (e.g., 0.1 for 10%)
|
|
84
|
+
config.sampling_rate = 1.0
|
|
85
|
+
|
|
86
|
+
# Ignored exceptions (skip logging these)
|
|
87
|
+
# config.ignored_exceptions = [
|
|
88
|
+
# "ActionController::RoutingError",
|
|
89
|
+
# "ActionController::InvalidAuthenticityToken",
|
|
90
|
+
# /^ActiveRecord::RecordNotFound/
|
|
91
|
+
# ]
|
|
92
|
+
|
|
93
|
+
# ============================================================================
|
|
94
|
+
# DATABASE CONFIGURATION
|
|
95
|
+
# ============================================================================
|
|
96
|
+
|
|
97
|
+
# Separate Error Database - DISABLED
|
|
98
|
+
# Errors are stored in your main application database
|
|
99
|
+
# To enable: Set config.use_separate_database = true and configure database.yml
|
|
100
|
+
config.use_separate_database = false
|
|
101
|
+
|
|
102
|
+
# ============================================================================
|
|
103
|
+
# ADVANCED ANALYTICS
|
|
104
|
+
# ============================================================================
|
|
105
|
+
|
|
106
|
+
# Baseline Anomaly Alerts - DISABLED
|
|
107
|
+
# To enable: Set config.enable_baseline_alerts = true
|
|
108
|
+
config.enable_baseline_alerts = false
|
|
109
|
+
# config.baseline_alert_threshold_std_devs = 2.0
|
|
110
|
+
# config.baseline_alert_severities = [ :critical, :high ]
|
|
111
|
+
# config.baseline_alert_cooldown_minutes = 120
|
|
112
|
+
|
|
113
|
+
# Fuzzy Error Matching - DISABLED
|
|
114
|
+
# To enable: Set config.enable_similar_errors = true
|
|
115
|
+
config.enable_similar_errors = false
|
|
116
|
+
|
|
117
|
+
# Co-occurring Errors - DISABLED
|
|
118
|
+
# To enable: Set config.enable_co_occurring_errors = true
|
|
119
|
+
config.enable_co_occurring_errors = false
|
|
120
|
+
|
|
121
|
+
# Error Cascade Detection - DISABLED
|
|
122
|
+
# To enable: Set config.enable_error_cascades = true
|
|
123
|
+
config.enable_error_cascades = false
|
|
124
|
+
|
|
125
|
+
# Error Correlation Analysis - DISABLED
|
|
126
|
+
# To enable: Set config.enable_error_correlation = true
|
|
127
|
+
config.enable_error_correlation = false
|
|
128
|
+
|
|
129
|
+
# Platform Comparison - DISABLED
|
|
130
|
+
# To enable: Set config.enable_platform_comparison = true
|
|
131
|
+
config.enable_platform_comparison = false
|
|
132
|
+
|
|
133
|
+
# Occurrence Pattern Detection - DISABLED
|
|
134
|
+
# To enable: Set config.enable_occurrence_patterns = true
|
|
135
|
+
config.enable_occurrence_patterns = false
|
|
136
|
+
|
|
137
|
+
# ============================================================================
|
|
138
|
+
# INTERNAL LOGGING (Silent by Default)
|
|
139
|
+
# ============================================================================
|
|
140
|
+
# Rails Error Dashboard logging is SILENT by default to keep your logs clean.
|
|
141
|
+
# Enable only for debugging gem issues or troubleshooting setup.
|
|
142
|
+
|
|
143
|
+
# Enable internal logging (default: false - silent)
|
|
144
|
+
config.enable_internal_logging = false
|
|
145
|
+
|
|
146
|
+
# Log level (default: :silent)
|
|
147
|
+
# Options: :debug, :info, :warn, :error, :silent
|
|
148
|
+
config.log_level = :silent
|
|
149
|
+
|
|
150
|
+
# Example: Enable verbose logging for debugging
|
|
151
|
+
# config.enable_internal_logging = true
|
|
152
|
+
# config.log_level = :debug
|
|
153
|
+
|
|
154
|
+
# Example: Log only errors (troubleshooting)
|
|
155
|
+
# config.enable_internal_logging = true
|
|
156
|
+
# config.log_level = :error
|
|
157
|
+
|
|
158
|
+
# ============================================================================
|
|
159
|
+
# ADDITIONAL CONFIGURATION
|
|
160
|
+
# ============================================================================
|
|
161
|
+
|
|
162
|
+
# Custom severity rules (override automatic severity classification)
|
|
163
|
+
# config.custom_severity_rules = {
|
|
164
|
+
# "PaymentError" => :critical,
|
|
165
|
+
# "ValidationError" => :low
|
|
166
|
+
# }
|
|
167
|
+
|
|
168
|
+
# Enhanced metrics (optional)
|
|
169
|
+
config.app_version = ENV["APP_VERSION"]
|
|
170
|
+
config.git_sha = ENV["GIT_SHA"]
|
|
171
|
+
# config.total_users_for_impact = 10000 # For user impact % calculation
|
|
172
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_error_dashboard
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anjan Jagirdar
|
|
@@ -311,6 +311,7 @@ files:
|
|
|
311
311
|
- app/views/rails_error_dashboard/errors/platform_comparison.html.erb
|
|
312
312
|
- app/views/rails_error_dashboard/errors/settings.html.erb
|
|
313
313
|
- app/views/rails_error_dashboard/errors/show.html.erb
|
|
314
|
+
- config/initializers/rails_error_dashboard.rb
|
|
314
315
|
- config/routes.rb
|
|
315
316
|
- db/migrate/20251224000001_create_rails_error_dashboard_error_logs.rb
|
|
316
317
|
- db/migrate/20251224081522_add_better_tracking_to_error_logs.rb
|
|
@@ -325,6 +326,7 @@ files:
|
|
|
325
326
|
- db/migrate/20251226020000_add_workflow_fields_to_error_logs.rb
|
|
326
327
|
- db/migrate/20251226020100_create_error_comments.rb
|
|
327
328
|
- db/migrate/20251229111223_add_additional_performance_indexes.rb
|
|
329
|
+
- db/migrate/20251230075315_cleanup_orphaned_migrations.rb
|
|
328
330
|
- lib/generators/rails_error_dashboard/install/install_generator.rb
|
|
329
331
|
- lib/generators/rails_error_dashboard/install/templates/README
|
|
330
332
|
- lib/generators/rails_error_dashboard/install/templates/initializer.rb
|
|
@@ -377,7 +379,7 @@ metadata:
|
|
|
377
379
|
source_code_uri: https://github.com/AnjanJ/rails_error_dashboard
|
|
378
380
|
changelog_uri: https://github.com/AnjanJ/rails_error_dashboard/blob/main/CHANGELOG.md
|
|
379
381
|
post_install_message: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n
|
|
380
|
-
\ Rails Error Dashboard v0.1.
|
|
382
|
+
\ Rails Error Dashboard v0.1.10 installed successfully!\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n\U0001F4E6
|
|
381
383
|
Next steps to get started:\n\n 1. Run the installer:\n rails generate rails_error_dashboard:install\n\n
|
|
382
384
|
\ 2. Run migrations:\n rails db:migrate\n\n 3. Mount the engine in config/routes.rb:\n
|
|
383
385
|
\ mount RailsErrorDashboard::Engine => '/error_dashboard'\n\n 4. Start your
|