class StaticTracing::Tracers

Tracers are a layer of abstraction above tracepoints. They are opinionated and contextual ways of applying tracepoints to an application.

Public Class Methods

add(tracer) click to toggle source
# File lib/ruby-static-tracing/tracers.rb, line 20
def add(tracer)
  raise InvalidTracerError unless tracer < StaticTracing::Tracer::Base

  tracers << tracer
end
clean() click to toggle source

Clears all tracers

# File lib/ruby-static-tracing/tracers.rb, line 38
def clean
  # FIXME: - actuallly ensure destroyed to avoid memory leaks
  @tracers = []
end
disable!() click to toggle source

Disables each tracer, replacing the method definition

# File lib/ruby-static-tracing/tracers.rb, line 33
def disable!
  tracers.each(&:disable!)
end
enable!() click to toggle source

Enables each tracer, overriding original method definition with traced one

# File lib/ruby-static-tracing/tracers.rb, line 28
def enable!
  tracers.each(&:enable!)
end