Class: Instana::Snapshot::RubyProcess
- Inherits:
-
Object
- Object
- Instana::Snapshot::RubyProcess
- Defined in:
- lib/instana/snapshot/ruby_process.rb
Overview
Describes the current Ruby process
Constant Summary collapse
- ID =
'com.instana.plugin.ruby'.freeze
Instance Method Summary collapse
- #data ⇒ Object
- #entity_id ⇒ Object
-
#initialize(pid: Process.pid) ⇒ RubyProcess
constructor
A new instance of RubyProcess.
- #snapshot ⇒ Object
Constructor Details
#initialize(pid: Process.pid) ⇒ RubyProcess
Returns a new instance of RubyProcess.
11 12 13 |
# File 'lib/instana/snapshot/ruby_process.rb', line 11 def initialize(pid: Process.pid) @pid = pid end |
Instance Method Details
#data ⇒ Object
19 20 21 |
# File 'lib/instana/snapshot/ruby_process.rb', line 19 def data metrics_data.merge(Util.take_snapshot) end |
#entity_id ⇒ Object
15 16 17 |
# File 'lib/instana/snapshot/ruby_process.rb', line 15 def entity_id @pid.to_s end |
#snapshot ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/instana/snapshot/ruby_process.rb', line 23 def snapshot { name: ID, entityId: entity_id, data: data } end |