Class: Logsy::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/logsy/configuration.rb

Constant Summary collapse

DEFAULT_IGNORED_CALLER_PATHS =
[
  %r{/logger\.rb\z},
  %r{/active_support/(tagged_logging|logger|broadcast_logger|log_subscriber)},
  %r{/lograge/},
  %r{/sprockets/},
  %r{/quiet_assets/},
  %r{/lib/logsy/}
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



21
22
23
24
25
26
# File 'lib/logsy/configuration.rb', line 21

def initialize
  @job_propagated_keys        = [:request_id]
  @ignored_caller_paths       = DEFAULT_IGNORED_CALLER_PATHS.dup
  @include_caller_location    = true
  @request_summary_event_name = 'request'
end

Instance Attribute Details

#ignored_caller_pathsObject

Tag keys that should be carried across job boundaries (e.g. when a background job is enqueued from a web request, the job inherits these). The middleware that does the actual carrying is job-runner specific (Logsy ships one for Sidekiq).



18
19
20
# File 'lib/logsy/configuration.rb', line 18

def ignored_caller_paths
  @ignored_caller_paths
end

#include_caller_locationObject

Tag keys that should be carried across job boundaries (e.g. when a background job is enqueued from a web request, the job inherits these). The middleware that does the actual carrying is job-runner specific (Logsy ships one for Sidekiq).



18
19
20
# File 'lib/logsy/configuration.rb', line 18

def include_caller_location
  @include_caller_location
end

#job_propagated_keysObject

Tag keys that should be carried across job boundaries (e.g. when a background job is enqueued from a web request, the job inherits these). The middleware that does the actual carrying is job-runner specific (Logsy ships one for Sidekiq).



18
19
20
# File 'lib/logsy/configuration.rb', line 18

def job_propagated_keys
  @job_propagated_keys
end

#request_summary_event_nameObject

Tag keys that should be carried across job boundaries (e.g. when a background job is enqueued from a web request, the job inherits these). The middleware that does the actual carrying is job-runner specific (Logsy ships one for Sidekiq).



18
19
20
# File 'lib/logsy/configuration.rb', line 18

def request_summary_event_name
  @request_summary_event_name
end