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
Observer Settings (planned for a future release).
-
#cache_slow_threshold ⇒ Object
Observer Settings (planned for a future release).
-
#cache_store_errors ⇒ Object
Observer Settings (planned for a future release).
-
#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
Retention Settings (planned for a future release).
-
#observe_cable ⇒ Object
Observer Settings (planned for a future release).
-
#observe_cache ⇒ Object
Observer Settings (planned for a future release).
-
#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.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/solid_observer/configuration.rb', line 62 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)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def buffer_overflow_strategy @buffer_overflow_strategy end |
#buffer_size ⇒ Object
Performance Settings (with validation)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def buffer_size @buffer_size end |
#cable_backlog_threshold ⇒ Object
Returns the value of attribute cable_backlog_threshold.
32 33 34 |
# File 'lib/solid_observer/configuration.rb', line 32 def cable_backlog_threshold @cable_backlog_threshold end |
#cable_error_threshold ⇒ Object
Returns the value of attribute cable_error_threshold.
32 33 34 |
# File 'lib/solid_observer/configuration.rb', line 32 def cable_error_threshold @cable_error_threshold end |
#cable_rejection_threshold ⇒ Object
Returns the value of attribute cable_rejection_threshold.
32 33 34 |
# File 'lib/solid_observer/configuration.rb', line 32 def cable_rejection_threshold @cable_rejection_threshold end |
#cable_sampling_rate ⇒ Object
Performance Settings (with validation)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def cable_sampling_rate @cable_sampling_rate end |
#cache_sampling_rate ⇒ Object
Cable observer is not yet fully implemented
Observer Settings (planned for a future release)
26 27 28 |
# File 'lib/solid_observer/configuration.rb', line 26 def cache_sampling_rate @cache_sampling_rate end |
#cache_slow_threshold ⇒ Object
Cable observer is not yet fully implemented
Observer Settings (planned for a future release)
26 27 28 |
# File 'lib/solid_observer/configuration.rb', line 26 def cache_slow_threshold @cache_slow_threshold end |
#cache_store_errors ⇒ Object
Cable observer is not yet fully implemented
Observer Settings (planned for a future release)
26 27 28 |
# File 'lib/solid_observer/configuration.rb', line 26 def cache_store_errors @cache_store_errors end |
#correlation_id_generator ⇒ Object
Correlation Settings
60 61 62 |
# File 'lib/solid_observer/configuration.rb', line 60 def correlation_id_generator @correlation_id_generator end |
#event_retention ⇒ Object
Retention Settings
37 38 39 |
# File 'lib/solid_observer/configuration.rb', line 37 def event_retention @event_retention end |
#filter_cache_ttl ⇒ Object
Performance Settings (with validation)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def filter_cache_ttl @filter_cache_ttl end |
#flush_interval ⇒ Object
Performance Settings (with validation)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def flush_interval @flush_interval end |
#max_buffer_size ⇒ Object
Performance Settings (with validation)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def max_buffer_size @max_buffer_size end |
#max_db_size ⇒ Object
Storage Settings
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def max_db_size @max_db_size end |
#metrics_retention ⇒ Object
Metrics cleanup is not yet implemented
Retention Settings (planned for a future release)
41 42 43 |
# File 'lib/solid_observer/configuration.rb', line 41 def metrics_retention @metrics_retention end |
#observe_cable ⇒ Object
Cable observer is not yet fully implemented
Observer Settings (planned for a future release)
26 27 28 |
# File 'lib/solid_observer/configuration.rb', line 26 def observe_cable @observe_cable end |
#observe_cache ⇒ Object
Cable observer is not yet fully implemented
Observer Settings (planned for a future release)
26 27 28 |
# File 'lib/solid_observer/configuration.rb', line 26 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)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def sampling_rate @sampling_rate end |
#storage_mode ⇒ Object
Storage Mode
47 48 49 |
# File 'lib/solid_observer/configuration.rb', line 47 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)
50 51 52 |
# File 'lib/solid_observer/configuration.rb', line 50 def warning_threshold @warning_threshold end |
Instance Method Details
#persistence_mode? ⇒ Boolean
90 91 92 |
# File 'lib/solid_observer/configuration.rb', line 90 def persistence_mode? @storage_mode == :persistence end |
#realtime_mode? ⇒ Boolean
94 95 96 |
# File 'lib/solid_observer/configuration.rb', line 94 def realtime_mode? @storage_mode == :realtime end |
#solid_cable_available? ⇒ Boolean
106 107 108 |
# File 'lib/solid_observer/configuration.rb', line 106 def solid_cable_available? !!defined?(::SolidCable) end |
#solid_cable_enabled? ⇒ Boolean
118 119 120 |
# File 'lib/solid_observer/configuration.rb', line 118 def solid_cable_enabled? observe_cable && solid_cable_available? end |
#solid_cache_available? ⇒ Boolean
102 103 104 |
# File 'lib/solid_observer/configuration.rb', line 102 def solid_cache_available? !!defined?(::SolidCache) end |
#solid_cache_enabled? ⇒ Boolean
114 115 116 |
# File 'lib/solid_observer/configuration.rb', line 114 def solid_cache_enabled? observe_cache && solid_cache_available? end |
#solid_queue_available? ⇒ Boolean
98 99 100 |
# File 'lib/solid_observer/configuration.rb', line 98 def solid_queue_available? !!defined?(::SolidQueue) end |
#solid_queue_enabled? ⇒ Boolean
110 111 112 |
# File 'lib/solid_observer/configuration.rb', line 110 def solid_queue_enabled? observe_queue end |