Sha256: f45a0dea4c46195273ace3698a4f5ee51775a5c1c21c9d9694169181f20e4568
Contents?: true
Size: 696 Bytes
Versions: 37
Compression:
Stored size: 696 Bytes
Contents
module Instana module Collectors class Thread attr_accessor :payload_key def initialize @payload_key = :thread @this_count = {} end ## # collect # # To collect thread count # def collect @this_count[:count] = ::Thread.list.count @this_count rescue => e ::Instana.logger.info "#{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}" ::Instana.logger.debug e.backtrace.join("\r\n") end end end end # Register the metrics collector if enabled if ::Instana.config[:metrics][:thread][:enabled] ::Instana.collector.register(::Instana::Collectors::Thread) end
Version data entries
37 entries across 37 versions & 1 rubygems