Class: RailsVitals::Configuration
- Inherits:
-
Object
- Object
- RailsVitals::Configuration
- Defined in:
- lib/rails_vitals/configuration.rb
Instance Attribute Summary collapse
-
#auth ⇒ Object
Returns the value of attribute auth.
-
#basic_auth_password ⇒ Object
Returns the value of attribute basic_auth_password.
-
#basic_auth_username ⇒ Object
Returns the value of attribute basic_auth_username.
-
#db_time_critical_ms ⇒ Object
Returns the value of attribute db_time_critical_ms.
-
#db_time_warn_ms ⇒ Object
Returns the value of attribute db_time_warn_ms.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#mcp_auth_token ⇒ Object
Returns the value of attribute mcp_auth_token.
-
#mcp_enabled ⇒ Object
Returns the value of attribute mcp_enabled.
-
#mcp_max_log_size ⇒ Object
Returns the value of attribute mcp_max_log_size.
-
#mcp_slow_query_threshold_ms ⇒ Object
Returns the value of attribute mcp_slow_query_threshold_ms.
-
#query_critical_threshold ⇒ Object
Returns the value of attribute query_critical_threshold.
-
#query_warn_threshold ⇒ Object
Returns the value of attribute query_warn_threshold.
-
#store_enabled ⇒ Object
Returns the value of attribute store_enabled.
-
#store_size ⇒ Object
Returns the value of attribute store_size.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rails_vitals/configuration.rb', line 18 def initialize @enabled = defined?(Rails) && !Rails.env.production? @store_size = 200 @store_enabled = true @auth = :none @basic_auth_username = nil @basic_auth_password = nil @query_warn_threshold = 10 @query_critical_threshold = 25 @db_time_warn_ms = 100 @db_time_critical_ms = 500 # MCP Server — disabled by default @mcp_enabled = false @mcp_auth_token = nil @mcp_max_log_size = 100 @mcp_slow_query_threshold_ms = 100 end |
Instance Attribute Details
#auth ⇒ Object
Returns the value of attribute auth.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def auth @auth end |
#basic_auth_password ⇒ Object
Returns the value of attribute basic_auth_password.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def basic_auth_password @basic_auth_password end |
#basic_auth_username ⇒ Object
Returns the value of attribute basic_auth_username.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def basic_auth_username @basic_auth_username end |
#db_time_critical_ms ⇒ Object
Returns the value of attribute db_time_critical_ms.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def db_time_critical_ms @db_time_critical_ms end |
#db_time_warn_ms ⇒ Object
Returns the value of attribute db_time_warn_ms.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def db_time_warn_ms @db_time_warn_ms end |
#enabled ⇒ Object
Returns the value of attribute enabled.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def enabled @enabled end |
#mcp_auth_token ⇒ Object
Returns the value of attribute mcp_auth_token.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def mcp_auth_token @mcp_auth_token end |
#mcp_enabled ⇒ Object
Returns the value of attribute mcp_enabled.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def mcp_enabled @mcp_enabled end |
#mcp_max_log_size ⇒ Object
Returns the value of attribute mcp_max_log_size.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def mcp_max_log_size @mcp_max_log_size end |
#mcp_slow_query_threshold_ms ⇒ Object
Returns the value of attribute mcp_slow_query_threshold_ms.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def mcp_slow_query_threshold_ms @mcp_slow_query_threshold_ms end |
#query_critical_threshold ⇒ Object
Returns the value of attribute query_critical_threshold.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def query_critical_threshold @query_critical_threshold end |
#query_warn_threshold ⇒ Object
Returns the value of attribute query_warn_threshold.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def query_warn_threshold @query_warn_threshold end |
#store_enabled ⇒ Object
Returns the value of attribute store_enabled.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def store_enabled @store_enabled end |
#store_size ⇒ Object
Returns the value of attribute store_size.
3 4 5 |
# File 'lib/rails_vitals/configuration.rb', line 3 def store_size @store_size end |