Class: PlainApm::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/plain_apm/config.rb

Constant Summary collapse

DEFAULT_EVENT_ENDPOINT =
"https://ingest.plainapm.com/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



9
10
11
12
13
# File 'lib/plain_apm/config.rb', line 9

def initialize
  @enabled = enabled? && key_present?
  @endpoint = ENV["PLAIN_APM_ENDPOINT"] || DEFAULT_EVENT_ENDPOINT
  @app_key = ENV["PLAIN_APM_APP_KEY"]
end

Instance Attribute Details

#app_keyObject

Returns the value of attribute app_key.



7
8
9
# File 'lib/plain_apm/config.rb', line 7

def app_key
  @app_key
end

#enabledObject

Returns the value of attribute enabled.



7
8
9
# File 'lib/plain_apm/config.rb', line 7

def enabled
  @enabled
end

#endpointObject

Returns the value of attribute endpoint.



7
8
9
# File 'lib/plain_apm/config.rb', line 7

def endpoint
  @endpoint
end