Sha256: 628f970d0c37aec05621504c522b5811e38d1718c558b19b4493c997454f9ea8

Contents?: true

Size: 1.06 KB

Versions: 24

Compression:

Stored size: 1.06 KB

Contents

require 'agent/handler/sequence_book'

module APMInsight
  module API
    class CustomAPIHandler
      
      ## Create tracker for custom instrumented methods and send them to tracker handler
      def self.invokeTracker name
        begin
#          @obj = ManageEngine::APMObjectHolder.instance
                  
          if Thread.current[:apminsight] != nil
            tracker = ManageEngine::Tracker::DefaultTracker.new(name)
            tracker = ManageEngine::Agent::TrackerHandler.invokeTracker(tracker)
            return tracker
          end
          
          return nil
        rescue Exception=>e
          return nil
        end
      end
      
      def self.exitTracker tracker
        if tracker != nil
          tracker.finish
          ManageEngine::Agent::TrackerHandler.exitTracker(tracker)
        end
      end
      
      def self.track_exception exception
        seqBook = Thread.current[:apminsight]
        if seqBook != nil
          seqBook.addExceptionInfo exception
        end
      end
      
    end #class CustomAPIhandler
  end #module API
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
site24x7_apminsight-1.9.3 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.9.2 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.9.1 lib/agent/handler/custom_api_handler.rb
apminsight-1.9.0 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.9.0 lib/agent/handler/custom_api_handler.rb
apminsight-1.8.8 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.8 lib/agent/handler/custom_api_handler.rb
apminsight-1.8.7 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.7 lib/agent/handler/custom_api_handler.rb
apminsight-1.8.6 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.6 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.5.1 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.5 lib/agent/handler/custom_api_handler.rb
apminsight-1.8.3 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.3 lib/agent/handler/custom_api_handler.rb
apminsight-1.8.2 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.2 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.1 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.8.0 lib/agent/handler/custom_api_handler.rb
site24x7_apminsight-1.7.3.0 lib/agent/handler/custom_api_handler.rb