Class: NewRelic::Agent::StatsEngine

Inherits:
Object
  • Object
show all
Includes:
MetricStats, Samplers, Transactions
Defined in:
lib/new_relic/agent/stats_engine.rb,
lib/new_relic/agent/stats_engine/samplers.rb,
lib/new_relic/agent/stats_engine/metric_stats.rb,
lib/new_relic/agent/stats_engine/transactions.rb

Defined Under Namespace

Modules: MetricStats, Samplers, Shim, Transactions Classes: ScopeStackElement

Constant Summary

Constants included from Samplers

Samplers::POLL_PERIOD

Instance Method Summary collapse

Methods included from Transactions

#end_transaction, #peek_scope, #pop_scope, #push_scope, #remove_transaction_sampler, #scope_name, #scope_name=, #start_transaction, #transaction_sampler=

Methods included from Samplers

#add_harvest_sampler, #add_sampler, #spawn_sampler_thread

Methods included from MetricStats

#clear_stats, #get_custom_stats, #get_stats, #get_stats_no_scope, #harvest_timeslice_data, #lookup_stat, #lookup_stats, #metrics, #reset_stats, #stats_hash

Constructor Details

#initializeStatsEngine

Returns a new instance of StatsEngine.



11
12
13
14
15
# File 'lib/new_relic/agent/stats_engine.rb', line 11

def initialize
  # Makes the unit tests happy
  Thread::current[:newrelic_scope_stack] = nil
  spawn_sampler_thread
end

Instance Method Details

#logObject



17
18
19
# File 'lib/new_relic/agent/stats_engine.rb', line 17

def log
  NewRelic::Control.instance.log
end