Metricsedit

The Ruby agent tracks various system and application metrics. These metrics will be sent regularly to the APM Server and from there to Elasticsearch. You can adjust the interval by setting metrics_interval.

The metrics will be stored in the apm-* index and have the processor.event property set to metric.

System metricsedit

Note: Metrics from the Ruby agent are Linux only for now.

system.cpu.total.norm.pctedit

  • Type: Float
  • Format: Percent

The percentage of CPU time in states other than Idle and IOWait, normalised by the number of cores.

system.memory.totaledit

  • Type: Long
  • Format: Bytes

The total memory of the system in bytes.

system.memory.actual.freeedit

  • Type: Long
  • Format: Bytes

Free memory of the system in bytes.

system.process.cpu.total.norm.pctedit

  • Type: Float
  • Format: Percent

The percentage of CPU time spent by the process since the last event. This value is normalized by the number of CPU cores and it ranges from 0 to 100%.

system.process.memory.sizeedit

  • Type: Long
  • Format: Bytes

The total virtual memory the process has.

system.process.memory.rss.bytesedit

  • Type: Long
  • Format: Bytes

The Resident Set Size, the amount of memory the process occupies in main memory (RAM).

Ruby Metricsedit

ruby.gc.countedit

  • Type: Integer
  • Format: Count

The number of Garbage Collection runs since the process started.

ruby.threadsedit

  • Type: Integer
  • Format: Count

The number of threads belonging to the current process.

ruby.heap.slots.liveedit

  • Type: Integer
  • Format: Slots

Current amount of heap slots that are live.

NB: Not currently supported on JRuby.

ruby.heap.slots.freeedit

  • Type: Integer
  • Format: Slots

Current amount of heap slots that are free.

NB: Not currently supported on JRuby.

ruby.heap.allocations.totaledit

  • Type: Integer
  • Format: Objects

Current amount of allocated objects on the heap.

NB: Not currently supported on JRuby.

ruby.gc.timeedit

  • Type: Float
  • Format: Seconds

The total time spent in garbage collection.

NB: You need to enable Ruby’s GC Profiler for this to get reported. You can do this at any time when your application boots by calling GC::Profiler.enable.