Class: Logister::Configuration
- Inherits:
-
Object
- Object
- Logister::Configuration
- Defined in:
- lib/logister/configuration.rb
Instance Attribute Summary collapse
-
#anonymize_ip ⇒ Object
Returns the value of attribute anonymize_ip.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#async ⇒ Object
Returns the value of attribute async.
-
#before_notify ⇒ Object
Returns the value of attribute before_notify.
-
#capture_db_metrics ⇒ Object
Returns the value of attribute capture_db_metrics.
-
#capture_sql_breadcrumbs ⇒ Object
Returns the value of attribute capture_sql_breadcrumbs.
-
#db_metric_min_duration_ms ⇒ Object
Returns the value of attribute db_metric_min_duration_ms.
-
#db_metric_sample_rate ⇒ Object
Returns the value of attribute db_metric_sample_rate.
-
#dependency_resolver ⇒ Object
Returns the value of attribute dependency_resolver.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#feature_flags_resolver ⇒ Object
Returns the value of attribute feature_flags_resolver.
-
#ignore_environments ⇒ Object
Returns the value of attribute ignore_environments.
-
#ignore_exceptions ⇒ Object
Returns the value of attribute ignore_exceptions.
-
#ignore_paths ⇒ Object
Returns the value of attribute ignore_paths.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#max_breadcrumbs ⇒ Object
Returns the value of attribute max_breadcrumbs.
-
#max_dependencies ⇒ Object
Returns the value of attribute max_dependencies.
-
#max_retries ⇒ Object
Returns the value of attribute max_retries.
-
#queue_size ⇒ Object
Returns the value of attribute queue_size.
-
#release ⇒ Object
Returns the value of attribute release.
-
#retry_base_interval ⇒ Object
Returns the value of attribute retry_base_interval.
-
#service ⇒ Object
Returns the value of attribute service.
-
#sql_breadcrumb_min_duration_ms ⇒ Object
Returns the value of attribute sql_breadcrumb_min_duration_ms.
-
#timeout_seconds ⇒ Object
Returns the value of attribute timeout_seconds.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/logister/configuration.rb', line 13 def initialize @api_key = ENV['LOGISTER_API_KEY'] @endpoint = ENV.fetch('LOGISTER_ENDPOINT', 'https://logister.org/api/v1/ingest_events') @environment = ENV.fetch('RAILS_ENV', ENV.fetch('RACK_ENV', 'development')) @service = ENV.fetch('LOGISTER_SERVICE', 'ruby-app') @release = ENV['LOGISTER_RELEASE'] @enabled = true @timeout_seconds = 2 @logger = Logger.new($stdout) @logger.level = Logger::WARN @ignore_exceptions = [] @ignore_environments = [] @ignore_paths = [] @before_notify = nil @async = true @queue_size = 1000 @max_retries = 3 @retry_base_interval = 0.5 @capture_db_metrics = false @db_metric_min_duration_ms = 0.0 @db_metric_sample_rate = 1.0 @feature_flags_resolver = nil @dependency_resolver = nil @anonymize_ip = false @max_breadcrumbs = 40 @max_dependencies = 20 @capture_sql_breadcrumbs = true @sql_breadcrumb_min_duration_ms = 25.0 end |
Instance Attribute Details
#anonymize_ip ⇒ Object
Returns the value of attribute anonymize_ip.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def anonymize_ip @anonymize_ip end |
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def api_key @api_key end |
#async ⇒ Object
Returns the value of attribute async.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def async @async end |
#before_notify ⇒ Object
Returns the value of attribute before_notify.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def before_notify @before_notify end |
#capture_db_metrics ⇒ Object
Returns the value of attribute capture_db_metrics.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def capture_db_metrics @capture_db_metrics end |
#capture_sql_breadcrumbs ⇒ Object
Returns the value of attribute capture_sql_breadcrumbs.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def @capture_sql_breadcrumbs end |
#db_metric_min_duration_ms ⇒ Object
Returns the value of attribute db_metric_min_duration_ms.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def db_metric_min_duration_ms @db_metric_min_duration_ms end |
#db_metric_sample_rate ⇒ Object
Returns the value of attribute db_metric_sample_rate.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def db_metric_sample_rate @db_metric_sample_rate end |
#dependency_resolver ⇒ Object
Returns the value of attribute dependency_resolver.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def dependency_resolver @dependency_resolver end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def enabled @enabled end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def endpoint @endpoint end |
#environment ⇒ Object
Returns the value of attribute environment.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def environment @environment end |
#feature_flags_resolver ⇒ Object
Returns the value of attribute feature_flags_resolver.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def feature_flags_resolver @feature_flags_resolver end |
#ignore_environments ⇒ Object
Returns the value of attribute ignore_environments.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def ignore_environments @ignore_environments end |
#ignore_exceptions ⇒ Object
Returns the value of attribute ignore_exceptions.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def ignore_exceptions @ignore_exceptions end |
#ignore_paths ⇒ Object
Returns the value of attribute ignore_paths.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def ignore_paths @ignore_paths end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def logger @logger end |
#max_breadcrumbs ⇒ Object
Returns the value of attribute max_breadcrumbs.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def @max_breadcrumbs end |
#max_dependencies ⇒ Object
Returns the value of attribute max_dependencies.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def max_dependencies @max_dependencies end |
#max_retries ⇒ Object
Returns the value of attribute max_retries.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def max_retries @max_retries end |
#queue_size ⇒ Object
Returns the value of attribute queue_size.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def queue_size @queue_size end |
#release ⇒ Object
Returns the value of attribute release.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def release @release end |
#retry_base_interval ⇒ Object
Returns the value of attribute retry_base_interval.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def retry_base_interval @retry_base_interval end |
#service ⇒ Object
Returns the value of attribute service.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def service @service end |
#sql_breadcrumb_min_duration_ms ⇒ Object
Returns the value of attribute sql_breadcrumb_min_duration_ms.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def @sql_breadcrumb_min_duration_ms end |
#timeout_seconds ⇒ Object
Returns the value of attribute timeout_seconds.
5 6 7 |
# File 'lib/logister/configuration.rb', line 5 def timeout_seconds @timeout_seconds end |