Sha256: 6efafe5b529b7eb84df62a730747515b01a07d5894f4712c2daa06a00c663b36

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

# Copyright (c) 2013 AppNeta, Inc.
# All rights reserved.

module TraceView
  ##
  # This module provides a method to manually initialize the
  # Ruby instrumentation.  Normally this is done by detecting
  # frameworks at load time and inserting initialization hooks.
  module Ruby
    class << self
      def initialize
        load
      end

      ##
      # The core method to load Ruby instrumentation.  Call this
      # from raw Ruby scripts or in Ruby applications where a
      # supported framework isn't being used.  Supported frameworks
      # will instead be detected at load time and initialization is
      # automatic.
      def load
        # In case some apps call this manually, make sure
        # that the gem is fully loaded and not in no-op
        # mode (e.g. on unsupported platforms etc.)
        if TraceView.loaded
          TraceView::Loading.load_access_key
          TraceView::Inst.load_instrumentation
        end
      end
    end
  end
end

if TraceView.loaded && !TraceView.framework?
  ::TraceView::Ruby.load
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
traceview-3.8.3-java lib/traceview/ruby.rb
traceview-3.8.3 lib/traceview/ruby.rb
traceview-3.8.2-java lib/traceview/ruby.rb
traceview-3.8.2 lib/traceview/ruby.rb
traceview-3.8.1-java lib/traceview/ruby.rb
traceview-3.8.1 lib/traceview/ruby.rb