Module: Woods::Console::Tools::Tier3
- Defined in:
- lib/woods/console/tools/tier3.rb
Overview
Tier 3: Analytics tools for monitoring live Rails application state.
Provides request performance metrics, job queue monitoring, cache statistics, and ActionCable channel status. Job-related tools delegate to backend-specific adapters (Sidekiq, Solid Queue, GoodJob).
Each method builds a bridge request hash from validated parameters. The bridge executes the query against the Rails environment.
Class Method Summary collapse
-
.console_cache_stats(namespace: nil) ⇒ Hash
Get cache store statistics.
-
.console_channel_status(channel: nil) ⇒ Hash
Get ActionCable channel status.
-
.console_error_rates(period: '1h', controller: nil) ⇒ Hash
Get error rates by controller or overall.
-
.console_job_failures(limit: 10, queue: nil) ⇒ Hash
List recent job failures.
-
.console_job_find(job_id:, retry_job: nil) ⇒ Hash
Find a job by ID, optionally retry it (requires confirmation).
-
.console_job_queues(queue: nil) ⇒ Hash
Get job queue statistics.
-
.console_job_schedule(limit: 20) ⇒ Hash
List scheduled/upcoming jobs.
-
.console_redis_info(section: nil) ⇒ Hash
Get Redis server information.
-
.console_slow_endpoints(limit: 10, period: '1h') ⇒ Hash
List slowest endpoints by response time.
-
.console_throughput(period: '1h', interval: '5m') ⇒ Hash
Get request throughput over time.
Class Method Details
.console_cache_stats(namespace: nil) ⇒ Hash
Get cache store statistics.
96 97 98 |
# File 'lib/woods/console/tools/tier3.rb', line 96 def console_cache_stats(namespace: nil) { tool: 'cache_stats', params: { namespace: namespace }.compact } end |
.console_channel_status(channel: nil) ⇒ Hash
Get ActionCable channel status.
104 105 106 |
# File 'lib/woods/console/tools/tier3.rb', line 104 def console_channel_status(channel: nil) { tool: 'channel_status', params: { channel: channel }.compact } end |
.console_error_rates(period: '1h', controller: nil) ⇒ Hash
Get error rates by controller or overall.
33 34 35 |
# File 'lib/woods/console/tools/tier3.rb', line 33 def console_error_rates(period: '1h', controller: nil) { tool: 'error_rates', params: { period: period, controller: controller }.compact } end |
.console_job_failures(limit: 10, queue: nil) ⇒ Hash
List recent job failures.
59 60 61 62 |
# File 'lib/woods/console/tools/tier3.rb', line 59 def console_job_failures(limit: 10, queue: nil) limit = [limit, 100].min { tool: 'job_failures', params: { limit: limit, queue: queue }.compact } end |
.console_job_find(job_id:, retry_job: nil) ⇒ Hash
Find a job by ID, optionally retry it (requires confirmation).
69 70 71 72 73 |
# File 'lib/woods/console/tools/tier3.rb', line 69 def console_job_find(job_id:, retry_job: nil) result = { tool: 'job_find', params: { job_id: job_id, retry: retry_job }.compact } result[:requires_confirmation] = true if retry_job result end |
.console_job_queues(queue: nil) ⇒ Hash
Get job queue statistics.
50 51 52 |
# File 'lib/woods/console/tools/tier3.rb', line 50 def console_job_queues(queue: nil) { tool: 'job_queues', params: { queue: queue }.compact } end |
.console_job_schedule(limit: 20) ⇒ Hash
List scheduled/upcoming jobs.
79 80 81 82 |
# File 'lib/woods/console/tools/tier3.rb', line 79 def console_job_schedule(limit: 20) limit = [limit, 100].min { tool: 'job_schedule', params: { limit: limit } } end |
.console_redis_info(section: nil) ⇒ Hash
Get Redis server information.
88 89 90 |
# File 'lib/woods/console/tools/tier3.rb', line 88 def console_redis_info(section: nil) { tool: 'redis_info', params: { section: section }.compact } end |
.console_slow_endpoints(limit: 10, period: '1h') ⇒ Hash
List slowest endpoints by response time.
23 24 25 26 |
# File 'lib/woods/console/tools/tier3.rb', line 23 def console_slow_endpoints(limit: 10, period: '1h') limit = [limit, 100].min { tool: 'slow_endpoints', params: { limit: limit, period: period } } end |
.console_throughput(period: '1h', interval: '5m') ⇒ Hash
Get request throughput over time.
42 43 44 |
# File 'lib/woods/console/tools/tier3.rb', line 42 def console_throughput(period: '1h', interval: '5m') { tool: 'throughput', params: { period: period, interval: interval } } end |