Class: SentrySmartSampler::Configuration
- Inherits:
-
Object
- Object
- SentrySmartSampler::Configuration
- Defined in:
- lib/sentry_smart_sampler/configuration.rb
Instance Attribute Summary collapse
- #after_throttling_threshold_reached ⇒ Object
-
#cache_storage ⇒ Object
Returns the value of attribute cache_storage.
- #default_sample_rate ⇒ Object
-
#default_throttling_errors_number_threshold ⇒ Object
Returns the value of attribute default_throttling_errors_number_threshold.
-
#default_throttling_time_unit ⇒ Object
Returns the value of attribute default_throttling_time_unit.
-
#logger ⇒ Object
Returns the value of attribute logger.
- #throttling_threshold_reached_definition ⇒ Object
Instance Method Summary collapse
- #declare_sampling_rate_per_error(&block) ⇒ Object
- #declare_throttling_per_error(&block) ⇒ Object
- #sampling_rate_per_error_registry ⇒ Object
- #throttling_per_error_registry ⇒ Object
Instance Attribute Details
#after_throttling_threshold_reached ⇒ Object
16 17 18 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 16 def after_throttling_threshold_reached @after_throttling_threshold_reached || default_after_throttling_threshold_reached_callback end |
#cache_storage ⇒ Object
Returns the value of attribute cache_storage.
5 6 7 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 5 def cache_storage @cache_storage end |
#default_sample_rate ⇒ Object
12 13 14 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 12 def default_sample_rate @default_sample_rate || 1 end |
#default_throttling_errors_number_threshold ⇒ Object
Returns the value of attribute default_throttling_errors_number_threshold.
5 6 7 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 5 def default_throttling_errors_number_threshold @default_throttling_errors_number_threshold end |
#default_throttling_time_unit ⇒ Object
Returns the value of attribute default_throttling_time_unit.
6 7 8 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 6 def default_throttling_time_unit @default_throttling_time_unit end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 5 def logger @logger end |
#throttling_threshold_reached_definition ⇒ Object
43 44 45 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 43 def throttling_threshold_reached_definition @throttling_threshold_reached_definition || ThrottlingThresholdReachedDefinition.new end |
Instance Method Details
#declare_sampling_rate_per_error(&block) ⇒ Object
26 27 28 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 26 def declare_sampling_rate_per_error(&block) sampling_rate_per_error_registry.instance_exec(&block) end |
#declare_throttling_per_error(&block) ⇒ Object
34 35 36 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 34 def declare_throttling_per_error(&block) throttling_per_error_registry.instance_exec(&block) end |
#sampling_rate_per_error_registry ⇒ Object
30 31 32 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 30 def sampling_rate_per_error_registry @sampling_rate_per_error_registry ||= SampleRatePerErrorRegistry.new(default_sample_rate) end |
#throttling_per_error_registry ⇒ Object
38 39 40 41 |
# File 'lib/sentry_smart_sampler/configuration.rb', line 38 def throttling_per_error_registry @throttling_per_error_registry ||= ThrottlingPerErrorRegistry.new(default_throttling_errors_number_threshold, default_throttling_time_unit) end |