Sha256: ee4e8ce74993362fad534dc95932a66fe2752b911f59afdeee8c014af920c568

Contents?: true

Size: 525 Bytes

Versions: 8

Compression:

Stored size: 525 Bytes

Contents

module AllscriptsUnityClient
  module NewRelicSupport
    def self.enable_method_tracer(instance)
      class << instance
        if !respond_to?(:trace_execution_scoped) && !respond_to?(:add_method_tracer)
          extend ::NewRelic::Agent::MethodTracer
        end
      end
    end

    def self.trace_execution_scoped_if_available(klass, scope)
      if klass.respond_to?(:trace_execution_scoped)
        klass.trace_execution_scoped(scope, &Proc.new)
      else
        yield if block_given?
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
allscripts_unity_client-2.2.0 lib/allscripts_unity_client/new_relic_support.rb
allscripts_unity_client-2.1.6 lib/allscripts_unity_client/new_relic_support.rb
allscripts_unity_client-2.1.5 lib/allscripts_unity_client/new_relic_support.rb
allscripts_unity_client-2.1.4 lib/allscripts_unity_client/new_relic_support.rb
allscripts_unity_client-2.1.3 lib/allscripts_unity_client/new_relic_support.rb
allscripts_unity_client-2.1.2 lib/allscripts_unity_client/new_relic_support.rb
allscripts_unity_client-2.1.1 lib/allscripts_unity_client/new_relic_support.rb
allscripts_unity_client-2.1.0 lib/allscripts_unity_client/new_relic_support.rb