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).
-
#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_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.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/solid_observer/configuration.rb', line 57 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, @cache_slow_threshold, @cache_store_errors, @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, true, 1000, 10.seconds, 10_000, :drop_old, 1.minute, nil end |
Instance Attribute Details
#buffer_overflow_strategy ⇒ Object
Performance Settings (with validation)
46 47 48 |
# File 'lib/solid_observer/configuration.rb', line 46 def buffer_overflow_strategy @buffer_overflow_strategy end |
#buffer_size ⇒ Object
Performance Settings (with validation)
46 47 48 |
# File 'lib/solid_observer/configuration.rb', line 46 def buffer_size @buffer_size end |
#cache_sampling_rate ⇒ Object
Cache and Cable observers are not yet 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
Cache and Cable observers are not yet 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
Cache and Cable observers are not yet 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
55 56 57 |
# File 'lib/solid_observer/configuration.rb', line 55 def correlation_id_generator @correlation_id_generator end |
#event_retention ⇒ Object
Retention Settings
33 34 35 |
# File 'lib/solid_observer/configuration.rb', line 33 def event_retention @event_retention end |
#filter_cache_ttl ⇒ Object
Performance Settings (with validation)
46 47 48 |
# File 'lib/solid_observer/configuration.rb', line 46 def filter_cache_ttl @filter_cache_ttl end |
#flush_interval ⇒ Object
Performance Settings (with validation)
46 47 48 |
# File 'lib/solid_observer/configuration.rb', line 46 def flush_interval @flush_interval end |
#max_buffer_size ⇒ Object
Performance Settings (with validation)
46 47 48 |
# File 'lib/solid_observer/configuration.rb', line 46 def max_buffer_size @max_buffer_size end |
#max_db_size ⇒ Object
Storage Settings
40 41 42 |
# File 'lib/solid_observer/configuration.rb', line 40 def max_db_size @max_db_size end |
#metrics_retention ⇒ Object
Metrics cleanup is not yet implemented
Retention Settings (planned for a future release)
37 38 39 |
# File 'lib/solid_observer/configuration.rb', line 37 def metrics_retention @metrics_retention end |
#observe_cable ⇒ Object
Cache and Cable observers are not yet 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
Cache and Cable observers are not yet 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)
46 47 48 |
# File 'lib/solid_observer/configuration.rb', line 46 def sampling_rate @sampling_rate end |
#storage_mode ⇒ Object
Storage Mode
43 44 45 |
# File 'lib/solid_observer/configuration.rb', line 43 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)
46 47 48 |
# File 'lib/solid_observer/configuration.rb', line 46 def warning_threshold @warning_threshold end |
Instance Method Details
#persistence_mode? ⇒ Boolean
82 83 84 |
# File 'lib/solid_observer/configuration.rb', line 82 def persistence_mode? @storage_mode == :persistence end |
#realtime_mode? ⇒ Boolean
86 87 88 |
# File 'lib/solid_observer/configuration.rb', line 86 def realtime_mode? @storage_mode == :realtime end |
#solid_cache_available? ⇒ Boolean
94 95 96 |
# File 'lib/solid_observer/configuration.rb', line 94 def solid_cache_available? !!defined?(::SolidCache) end |
#solid_cache_enabled? ⇒ Boolean
102 103 104 |
# File 'lib/solid_observer/configuration.rb', line 102 def solid_cache_enabled? observe_cache && solid_cache_available? end |
#solid_queue_available? ⇒ Boolean
90 91 92 |
# File 'lib/solid_observer/configuration.rb', line 90 def solid_queue_available? !!defined?(::SolidQueue) end |
#solid_queue_enabled? ⇒ Boolean
98 99 100 |
# File 'lib/solid_observer/configuration.rb', line 98 def solid_queue_enabled? observe_queue end |