Sha256: bfb47487a59e880513bd27a2b240d2764fde6c4989425f19cdcc111158bb6072
Contents?: true
Size: 847 Bytes
Versions: 15
Compression:
Stored size: 847 Bytes
Contents
# encoding: utf-8 LibraryDetection.defer do named :rubyprof depends_on do defined?(::RubyProf) && defined?(::OneApm::Rack::DeveloperMode) && ::OneApm::Manager.config[:developer_mode] end executes do ::OneApm::Manager.agent.events.subscribe(:start_transaction) do if ::OneApm::Rack::DeveloperMode.profiled? begin ::RubyProf.start rescue => e OneApm::Manager.logger.debug e.message end end end ::OneApm::Manager.agent.events.subscribe(:transaction_finished) do if ::OneApm::Rack::DeveloperMode.profiled? begin trace = OneApm::TransactionState.tl_get.current_transaction.transaction_trace trace.profile = ::RubyProf.stop rescue => e OneApm::Manager.logger.debug e.message end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems