class Nexaas::Auditor::StatisticsTracker
Constants
- VALID_SERVICES
Public Class Methods
setup(service, namespace=nil)
click to toggle source
# File lib/nexaas/auditor/statistics_tracker.rb, line 7 def self.setup(service, namespace=nil) raise ArgumentError, "unknown statistics service '#{service}'" unless VALID_SERVICES.include?(service) tracker = if service == 'stathat' key = Nexaas::Auditor.configuration.stathat_settings[:key] StatisticsTrackers::Stathat.new(key, namespace) else logger = Nexaas::Auditor.configuration.logger StatisticsTrackers::Log.new(logger, namespace) end tracker end