Class: BetterFx::Configuration

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

Overview

Provides configuration management for the BetterFx gem

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
# File 'lib/better_fx/configuration.rb', line 9

def initialize
  @signalfx_api_token       = ENV["SIGNALFX_API_TOKEN"]
  @supported_environments   = [:production, :prod, "production", "prod"]
  @current_environment      = ENV["APP_ENV"] || :production
  @signalfx_metric_namespace = ENV["SIGNALFX_METRIC_NAMESPACE"] || :better_fx
end

Instance Attribute Details

#current_environmentObject

Returns the value of attribute current_environment.



4
5
6
# File 'lib/better_fx/configuration.rb', line 4

def current_environment
  @current_environment
end

#signalfx_api_tokenObject

Returns the value of attribute signalfx_api_token.



4
5
6
# File 'lib/better_fx/configuration.rb', line 4

def signalfx_api_token
  @signalfx_api_token
end

#signalfx_metric_namespaceObject

Returns the value of attribute signalfx_metric_namespace.



4
5
6
# File 'lib/better_fx/configuration.rb', line 4

def signalfx_metric_namespace
  @signalfx_metric_namespace
end

#supported_environmentsObject

Returns the value of attribute supported_environments.



4
5
6
# File 'lib/better_fx/configuration.rb', line 4

def supported_environments
  @supported_environments
end