Class: SolidObserver::Configuration
- Inherits:
-
Object
- Object
- SolidObserver::Configuration
- Defined in:
- lib/solid_observer/configuration.rb
Overview
Configuration options for SolidObserver.
Constant Summary collapse
- STORAGE_MODES =
%i[persistence realtime].freeze
- BUFFER_OVERFLOW_STRATEGIES =
%i[drop_old drop_new].freeze
Instance Attribute Summary collapse
-
#buffer_overflow_strategy ⇒ Object
Performance Settings (with validation).
-
#buffer_size ⇒ Object
Performance Settings (with validation).
-
#cable_backlog_threshold ⇒ Object
Returns the value of attribute cable_backlog_threshold.
-
#cable_error_threshold ⇒ Object
Returns the value of attribute cable_error_threshold.
-
#cable_rejection_threshold ⇒ Object
Returns the value of attribute cable_rejection_threshold.
-
#cable_sampling_rate ⇒ Object
Performance Settings (with validation).
-
#cache_sampling_rate ⇒ Object
Cache & Cable Observer Settings.
-
#cache_slow_threshold ⇒ Object
Cache & Cable Observer Settings.
-
#cache_store_errors ⇒ Object
Cache & Cable Observer Settings.
-
#correlation_id_generator ⇒ Object
Correlation Settings.
-
#event_retention ⇒ Object
Retention Settings.
-
#filter_cache_ttl ⇒ Object
Performance Settings (with validation).
-
#flush_interval ⇒ Object
Performance Settings (with validation).
-
#max_buffer_size ⇒ Object
Performance Settings (with validation).
-
#max_db_size ⇒ Object
Storage Settings.
-
#metrics_retention ⇒ Object
Returns the value of attribute metrics_retention.
-
#observe_cable ⇒ Object
Cache & Cable Observer Settings.
-
#observe_cache ⇒ Object
Cache & Cable Observer Settings.
-
#observe_queue ⇒ Object
Observer Settings.
-
#sampling_rate ⇒ Object
Performance Settings (with validation).
-
#storage_mode ⇒ Object
Storage Mode.
-
#ui_base_controller ⇒ Object
UI Settings.
-
#ui_enabled ⇒ Object
UI Settings.
-
#ui_password ⇒ Object
UI Settings.
-
#ui_username ⇒ Object
UI Settings.
-
#warning_threshold ⇒ Object
Performance Settings (with validation).
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #persistence_mode? ⇒ Boolean
- #realtime_mode? ⇒ Boolean
- #solid_cable_available? ⇒ Boolean
- #solid_cable_enabled? ⇒ Boolean
- #solid_cache_available? ⇒ Boolean
- #solid_cache_enabled? ⇒ Boolean
- #solid_queue_available? ⇒ Boolean
- #solid_queue_enabled? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/solid_observer/configuration.rb', line 59 def initialize @ui_enabled, @ui_base_controller, @ui_username, @ui_password, @storage_mode, @observe_queue, @observe_cache, @observe_cable, @event_retention, @metrics_retention, @max_db_size, @warning_threshold, @sampling_rate, @cache_sampling_rate, @cable_sampling_rate, @cache_slow_threshold, @cache_store_errors, @cable_rejection_threshold, @cable_backlog_threshold, @cable_error_threshold, @buffer_size, @flush_interval, @max_buffer_size, @buffer_overflow_strategy, @filter_cache_ttl, @correlation_id_generator = !production?, "::ApplicationController", nil, nil, :persistence, true, false, false, 30.days, 90.days, 1.gigabyte, 0.8, 1.0, 0.1, 0.1, 0.1, true, 0.05, 0.10, 0.0, 1000, 10.seconds, 10_000, :drop_old, 1.minute, nil end |
Instance Attribute Details
#buffer_overflow_strategy ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def buffer_overflow_strategy @buffer_overflow_strategy end |
#buffer_size ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def buffer_size @buffer_size end |
#cable_backlog_threshold ⇒ Object
Returns the value of attribute cable_backlog_threshold.
31 32 33 |
# File 'lib/solid_observer/configuration.rb', line 31 def cable_backlog_threshold @cable_backlog_threshold end |
#cable_error_threshold ⇒ Object
Returns the value of attribute cable_error_threshold.
31 32 33 |
# File 'lib/solid_observer/configuration.rb', line 31 def cable_error_threshold @cable_error_threshold end |
#cable_rejection_threshold ⇒ Object
Returns the value of attribute cable_rejection_threshold.
31 32 33 |
# File 'lib/solid_observer/configuration.rb', line 31 def cable_rejection_threshold @cable_rejection_threshold end |
#cable_sampling_rate ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def cable_sampling_rate @cable_sampling_rate end |
#cache_sampling_rate ⇒ Object
Cache & Cable Observer Settings
25 26 27 |
# File 'lib/solid_observer/configuration.rb', line 25 def cache_sampling_rate @cache_sampling_rate end |
#cache_slow_threshold ⇒ Object
Cache & Cable Observer Settings
25 26 27 |
# File 'lib/solid_observer/configuration.rb', line 25 def cache_slow_threshold @cache_slow_threshold end |
#cache_store_errors ⇒ Object
Cache & Cable Observer Settings
25 26 27 |
# File 'lib/solid_observer/configuration.rb', line 25 def cache_store_errors @cache_store_errors end |
#correlation_id_generator ⇒ Object
Correlation Settings
57 58 59 |
# File 'lib/solid_observer/configuration.rb', line 57 def correlation_id_generator @correlation_id_generator end |
#event_retention ⇒ Object
Retention Settings
36 37 38 |
# File 'lib/solid_observer/configuration.rb', line 36 def event_retention @event_retention end |
#filter_cache_ttl ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def filter_cache_ttl @filter_cache_ttl end |
#flush_interval ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def flush_interval @flush_interval end |
#max_buffer_size ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def max_buffer_size @max_buffer_size end |
#max_db_size ⇒ Object
Storage Settings
41 42 43 |
# File 'lib/solid_observer/configuration.rb', line 41 def max_db_size @max_db_size end |
#metrics_retention ⇒ Object
Returns the value of attribute metrics_retention.
38 39 40 |
# File 'lib/solid_observer/configuration.rb', line 38 def metrics_retention @metrics_retention end |
#observe_cable ⇒ Object
Cache & Cable Observer Settings
25 26 27 |
# File 'lib/solid_observer/configuration.rb', line 25 def observe_cable @observe_cable end |
#observe_cache ⇒ Object
Cache & Cable Observer Settings
25 26 27 |
# File 'lib/solid_observer/configuration.rb', line 25 def observe_cache @observe_cache end |
#observe_queue ⇒ Object
Observer Settings
22 23 24 |
# File 'lib/solid_observer/configuration.rb', line 22 def observe_queue @observe_queue end |
#sampling_rate ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def sampling_rate @sampling_rate end |
#storage_mode ⇒ Object
Storage Mode
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def storage_mode @storage_mode end |
#ui_base_controller ⇒ Object
UI Settings
16 17 18 |
# File 'lib/solid_observer/configuration.rb', line 16 def ui_base_controller @ui_base_controller end |
#ui_enabled ⇒ Object
UI Settings
16 17 18 |
# File 'lib/solid_observer/configuration.rb', line 16 def ui_enabled @ui_enabled end |
#ui_password ⇒ Object
UI Settings
16 17 18 |
# File 'lib/solid_observer/configuration.rb', line 16 def ui_password @ui_password end |
#ui_username ⇒ Object
UI Settings
16 17 18 |
# File 'lib/solid_observer/configuration.rb', line 16 def ui_username @ui_username end |
#warning_threshold ⇒ Object
Performance Settings (with validation)
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 def warning_threshold @warning_threshold end |
Instance Method Details
#persistence_mode? ⇒ Boolean
87 88 89 |
# File 'lib/solid_observer/configuration.rb', line 87 def persistence_mode? @storage_mode == :persistence end |
#realtime_mode? ⇒ Boolean
91 92 93 |
# File 'lib/solid_observer/configuration.rb', line 91 def realtime_mode? @storage_mode == :realtime end |
#solid_cable_available? ⇒ Boolean
103 104 105 |
# File 'lib/solid_observer/configuration.rb', line 103 def solid_cable_available? !!defined?(::SolidCable) end |
#solid_cable_enabled? ⇒ Boolean
115 116 117 |
# File 'lib/solid_observer/configuration.rb', line 115 def solid_cable_enabled? observe_cable && solid_cable_available? end |
#solid_cache_available? ⇒ Boolean
99 100 101 |
# File 'lib/solid_observer/configuration.rb', line 99 def solid_cache_available? !!defined?(::SolidCache) end |
#solid_cache_enabled? ⇒ Boolean
111 112 113 |
# File 'lib/solid_observer/configuration.rb', line 111 def solid_cache_enabled? observe_cache && solid_cache_available? end |
#solid_queue_available? ⇒ Boolean
95 96 97 |
# File 'lib/solid_observer/configuration.rb', line 95 def solid_queue_available? !!defined?(::SolidQueue) end |
#solid_queue_enabled? ⇒ Boolean
107 108 109 |
# File 'lib/solid_observer/configuration.rb', line 107 def solid_queue_enabled? observe_queue end |