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).
-
#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
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/solid_observer/configuration.rb', line 55 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, @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, 1000, 10.seconds, 10_000, :drop_old, 1.minute, nil end |
Instance Attribute Details
#buffer_overflow_strategy ⇒ Object
Performance Settings (with validation)
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def buffer_overflow_strategy @buffer_overflow_strategy end |
#buffer_size ⇒ Object
Performance Settings (with validation)
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 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 |
#correlation_id_generator ⇒ Object
Correlation Settings
53 54 55 |
# File 'lib/solid_observer/configuration.rb', line 53 def correlation_id_generator @correlation_id_generator end |
#event_retention ⇒ Object
Retention Settings
31 32 33 |
# File 'lib/solid_observer/configuration.rb', line 31 def event_retention @event_retention end |
#filter_cache_ttl ⇒ Object
Performance Settings (with validation)
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def filter_cache_ttl @filter_cache_ttl end |
#flush_interval ⇒ Object
Performance Settings (with validation)
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def flush_interval @flush_interval end |
#max_buffer_size ⇒ Object
Performance Settings (with validation)
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def max_buffer_size @max_buffer_size end |
#max_db_size ⇒ Object
Storage Settings
38 39 40 |
# File 'lib/solid_observer/configuration.rb', line 38 def max_db_size @max_db_size end |
#metrics_retention ⇒ Object
Metrics cleanup is not yet implemented
Retention Settings (planned for a future release)
35 36 37 |
# File 'lib/solid_observer/configuration.rb', line 35 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)
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def sampling_rate @sampling_rate end |
#storage_mode ⇒ Object
Storage Mode
41 42 43 |
# File 'lib/solid_observer/configuration.rb', line 41 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)
44 45 46 |
# File 'lib/solid_observer/configuration.rb', line 44 def warning_threshold @warning_threshold end |
Instance Method Details
#persistence_mode? ⇒ Boolean
79 80 81 |
# File 'lib/solid_observer/configuration.rb', line 79 def persistence_mode? @storage_mode == :persistence end |
#realtime_mode? ⇒ Boolean
83 84 85 |
# File 'lib/solid_observer/configuration.rb', line 83 def realtime_mode? @storage_mode == :realtime end |