Class: Apidepth::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/apidepth/configuration.rb', line 17

def initialize
  @enabled                   = true
  @flush_interval            = 20
  @registry_refresh_interval = 6 * 60 * 60
  @registry_cache_path       = "/tmp/apidepth_registry.json"
  @collector_url             = nil
  @ignored_hosts             = []
  @on_flush_error            = nil
  @environment               = nil   # Railtie sets this to Rails.env at boot
  @sample_rate               = 1.0   # capture everything by default
  @extra_vendors             = {}    # customer-defined host mappings
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def api_key
  @api_key
end

#collector_urlObject

Returns the value of attribute collector_url.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def collector_url
  @collector_url
end

#enabledObject

Returns the value of attribute enabled.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def enabled
  @enabled
end

#environmentObject

Returns the value of attribute environment.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def environment
  @environment
end

#extra_vendorsObject

Returns the value of attribute extra_vendors.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def extra_vendors
  @extra_vendors
end

#flush_intervalObject

Returns the value of attribute flush_interval.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def flush_interval
  @flush_interval
end

#ignored_hostsObject

Returns the value of attribute ignored_hosts.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def ignored_hosts
  @ignored_hosts
end

#on_flush_errorObject

Returns the value of attribute on_flush_error.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def on_flush_error
  @on_flush_error
end

#registry_cache_pathObject

Returns the value of attribute registry_cache_path.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def registry_cache_path
  @registry_cache_path
end

#registry_refresh_intervalObject

Returns the value of attribute registry_refresh_interval.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def registry_refresh_interval
  @registry_refresh_interval
end

#sample_rateObject

Returns the value of attribute sample_rate.



5
6
7
# File 'lib/apidepth/configuration.rb', line 5

def sample_rate
  @sample_rate
end