Class: ManageEngine::Instrumentation::PumaWorker
- Inherits:
-
Object
- Object
- ManageEngine::Instrumentation::PumaWorker
- Defined in:
- lib/agent/server/instrument/puma.rb
Instance Method Summary collapse
Instance Method Details
#env ⇒ Object
13 14 15 |
# File 'lib/agent/server/instrument/puma.rb', line 13 def env ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development' end |
#instrument ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/agent/server/instrument/puma.rb', line 21 def instrument ManageEngine::APMObjectHolder.instance.log.info "Instrumenting Puma server workers. Version: #{version}" Puma::Server.class_eval do include ManageEngine::Instrumentation::PumaRun alias original_run run alias run agent_run end end |
#name ⇒ Object
17 18 19 |
# File 'lib/agent/server/instrument/puma.rb', line 17 def name 'Puma Worker' end |
#present? ⇒ Boolean
5 6 7 |
# File 'lib/agent/server/instrument/puma.rb', line 5 def present? defined?(Puma::Server) end |
#version ⇒ Object
9 10 11 |
# File 'lib/agent/server/instrument/puma.rb', line 9 def version Puma::Const::PUMA_VERSION end |