Class: PlainApm::Config
- Inherits:
-
Object
- Object
- PlainApm::Config
- Defined in:
- lib/plain_apm/config.rb
Constant Summary collapse
- DEFAULT_EVENT_ENDPOINT =
"https://ingest.plainapm.com/"
Instance Attribute Summary collapse
-
#app_key ⇒ Object
Returns the value of attribute app_key.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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_key ⇒ Object
Returns the value of attribute app_key.
7 8 9 |
# File 'lib/plain_apm/config.rb', line 7 def app_key @app_key end |
#enabled ⇒ Object
Returns the value of attribute enabled.
7 8 9 |
# File 'lib/plain_apm/config.rb', line 7 def enabled @enabled end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
7 8 9 |
# File 'lib/plain_apm/config.rb', line 7 def endpoint @endpoint end |