Module: StackifyRubyAPM::Util

Defined in:
lib/stackify_apm/util.rb,
lib/stackify_apm/util/inflector.rb,
lib/stackify_apm/util/inspector.rb,
lib/stackify_apm/util/lru_cache.rb,
lib/stackify_apm/util/trace_log_watcher.rb

Overview

rubocop:disable all

Defined Under Namespace

Modules: Inflector, TraceLogWatcher Classes: Inspector, LruCache

Class Method Summary collapse

Class Method Details

.apm_disabled_in_rakeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method will check if there is any rake task is running. If rake task is detected we set instrument=false and don’t load the spies.



15
16
17
18
# File 'lib/stackify_apm/util.rb', line 15

def self.apm_disabled_in_rake
  cmd_rake = ($PROGRAM_NAME =~ /rake$/)
  StackifyRubyAPM.agent.config.instrument = false if cmd_rake
end

.micros(target = Time.now.utc) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/stackify_apm/util.rb', line 7

def self.micros(target = Time.now.utc)
  target.to_i * 1_000_000 + target.usec
end