Sha256: a305255f7e52fc8a16666ce147a839c76984e45cc796bdc3de1466e621861f37
Contents?: true
Size: 1008 Bytes
Versions: 57
Compression:
Stored size: 1008 Bytes
Contents
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2021 module Instana module Snapshot # Describes the current Ruby process # @since 1.197.0 class RubyProcess ID = 'com.instana.plugin.ruby'.freeze def initialize(pid: Process.pid) @pid = pid end def entity_id @pid.to_s end def data metrics_data.merge(Util.take_snapshot) end def snapshot { name: ID, entityId: entity_id, data: data } end private def metrics_data proc_table = Sys::ProcTable.ps(pid: Process.pid) process = Backend::ProcessInfo.new(proc_table) { pid: @pid, name: Util.get_app_name, exec_args: process.arguments, gc: Backend::GCSnapshot.instance.report, thread: {count: ::Thread.list.count}, memory: {rss_size: proc_table.rss / 1024} # Bytes to Kilobytes } end end end end
Version data entries
57 entries across 57 versions & 1 rubygems