Sha256: f799c4a6c24956676904a1ba83e2cfd81feffcffdf2dfbcffd7a9e8d0560652a

Contents?: true

Size: 1 KB

Versions: 23

Compression:

Stored size: 1 KB

Contents

# Copyright (c) 2016 SolarWinds, LLC.
# All rights reserved.

module AppOpticsAPM
  ##
  # 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 AppOpticsAPM.loaded
          AppOpticsAPM::Inst.load_instrumentation
        end
      end
    end
  end
end

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

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
appoptics_apm-zearn-4.13.1 lib/appoptics_apm/ruby.rb
appoptics_apm-4.13.0 lib/appoptics_apm/ruby.rb
appoptics_apm-4.12.2 lib/appoptics_apm/ruby.rb
appoptics_apm-4.12.1 lib/appoptics_apm/ruby.rb
appoptics_apm-4.12.0 lib/appoptics_apm/ruby.rb
appoptics_apm-4.11.2 lib/appoptics_apm/ruby.rb
appoptics_apm-4.11.1 lib/appoptics_apm/ruby.rb
appoptics_apm-4.11.0 lib/appoptics_apm/ruby.rb
appoptics_apm-4.10.1 lib/appoptics_apm/ruby.rb
appoptics_apm-4.10.0 lib/appoptics_apm/ruby.rb
appoptics_apm-4.9.0 lib/appoptics_apm/ruby.rb
appoptics_apm-4.8.4 lib/appoptics_apm/ruby.rb
appoptics_apm-4.8.3 lib/appoptics_apm/ruby.rb
appoptics_apm-4.8.2 lib/appoptics_apm/ruby.rb
appoptics_apm-4.8.1 lib/appoptics_apm/ruby.rb
appoptics_apm-4.8.0 lib/appoptics_apm/ruby.rb
appoptics_apm-4.7.0 lib/appoptics_apm/ruby.rb
appoptics_apm-4.6.0 lib/appoptics_apm/ruby.rb
appoptics_apm_mnfst-4.5.2 lib/appoptics_apm/ruby.rb
appoptics_apm-4.5.2 lib/appoptics_apm/ruby.rb