Class: Dbwatcher::Services::SystemInfo::DatabaseInfoCollector
- Inherits:
-
Object
- Object
- Dbwatcher::Services::SystemInfo::DatabaseInfoCollector
- Includes:
- Logging
- Defined in:
- lib/dbwatcher/services/system_info/database_info_collector.rb
Overview
Database information collector service
Collects database-specific information including adapter, version, connection pool stats, table counts, and schema information.
This class is necessarily complex due to the comprehensive database information it needs to collect across different database systems. rubocop:disable Metrics/ClassLength
Class Method Summary collapse
-
.call ⇒ Hash
Class method to create instance and call.
Instance Method Summary collapse
Methods included from Logging
#debug_enabled?, #log_debug, #log_error, #log_info, #log_warn
Class Method Details
.call ⇒ Hash
Class method to create instance and call
28 29 30 |
# File 'lib/dbwatcher/services/system_info/database_info_collector.rb', line 28 def self.call new.call end |
Instance Method Details
#call ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/dbwatcher/services/system_info/database_info_collector.rb', line 32 def call log_info "#{self.class.name}: Collecting database information" { adapter: collect_adapter_info, version: collect_database_version, connection_pool: collect_connection_pool_info, tables: collect_table_info, schema: collect_schema_info, indexes: collect_index_info, query_stats: collect_query_stats } rescue StandardError => e log_error "Database info collection failed: #{e.}" { error: e. } end |