Metricsedit

The Java agent tracks certain system and application metrics. Some of them have built-in visualizations and some can only be visualized with custom Kibana dashboards.

These metrics will be sent regularly to the APM Server and from there to Elasticsearch. You can adjust the interval with the setting metrics_interval.

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

Dedicated JVM metrics views are available since Elastic stack version 7.2. Starting in 7.5, metrics are aggregated separately for each JVM, relying on the ID of the underlying system — either container ID (where applicable) or hostname. Starting in Java agent version 1.11.0, it is possible to manually configure a unique name for each service node/JVM through service_node_name. When multiple JVMs are running on the same host and report data for the same service, this configuration is required in order to be able to view metrics at the JVM level.

System metricsedit

As of version 6.6, these metrics will be visualized in the APM UI.

For more system metrics, consider installing metricbeat on your hosts.

system.cpu.total.norm.pct

type: scaled_float

format: percent

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

system.process.cpu.total.norm.pct

type: scaled_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.memory.total

type: long

format: bytes

Total memory.

system.memory.actual.free

type: long

format: bytes

Actual free memory in bytes. It is calculated based on the OS. On Linux it consists of the free memory plus caches and buffers. On OSX it is a sum of free memory and the inactive memory. On Windows, this value does not include memory consumed by system caches and buffers.

system.process.memory.size

type: long

format: bytes

The total virtual memory the process has.

JVM Metricsedit

As of now, there are no built-in visualizations for these metrics, so you will need to create custom Kibana dashboards for them.

jvm.memory.heap.used

type: long

format: bytes

The amount of used heap memory in bytes

jvm.memory.heap.committed

type: long

format: bytes

The amount of heap memory in bytes that is committed for the Java virtual machine to use. This amount of memory is guaranteed for the Java virtual machine to use.

jvm.memory.heap.max

type: long

format: bytes

The maximum amount of heap memory in bytes that can be used for memory management. If the maximum memory size is undefined, the value is -1.

jvm.memory.non_heap.used

type: long

format: bytes

The amount of used non-heap memory in bytes

jvm.memory.non_heap.committed

type: long

format: bytes

The amount of non-heap memory in bytes that is committed for the Java virtual machine to use. This amount of memory is guaranteed for the Java virtual machine to use.

jvm.memory.non_heap.max

type: long

format: bytes

The maximum amount of non-heap memory in bytes that can be used for memory management. If the maximum memory size is undefined, the value is -1.

jvm.thread.count

type: int

The current number of live threads in the JVM, including both daemon and non-daemon threads.

jvm.gc.count

type: long

labels

  • name: The name representing this memory manager (for example G1 Young Generation, G1 Old Generation)

The total number of collections that have occurred.

jvm.gc.time

type: long

format: ms

labels

  • name: The name representing this memory manager (for example G1 Young Generation, G1 Old Generation)

The approximate accumulated collection elapsed time in milliseconds.

jvm.gc.alloc

type: long

format: bytes

An approximation of the total amount of memory, in bytes, allocated in heap memory.

Application Metricsedit

transaction.duration

type: simple timer

This timer tracks the duration of transactions and allows for the creation of graphs displaying a weighted average.

Fields:

  • sum: The sum of all transaction durations in ms since the last report (the delta)
  • count: The count of all transactions since the last report (the delta)

You can filter and group by these dimensions:

  • transaction.name: The name of the transaction
  • transaction.type: The type of the transaction, for example request
transaction.breakdown.count

type: long

format: count (delta)

The number of transactions for which breakdown metrics (span.self_time) have been created. As the Java agent tracks the breakdown for both sampled and non-sampled transactions, this metric is equivalent to transaction.duration.count

You can filter and group by these dimensions:

  • transaction.name: The name of the transaction
  • transaction.type: The type of the transaction, for example request
span.self_time

type: simple timer

This timer tracks the span self-times and is the basis of the transaction breakdown visualization.

Fields:

  • sum: The sum of all span self-times in ms since the last report (the delta)
  • count: The count of all span self-times since the last report (the delta)

You can filter and group by these dimensions:

  • transaction.name: The name of the transaction
  • transaction.type: The type of the transaction, for example request
  • span.type: The type of the span, for example app, template or db
  • span.subtype: The sub-type of the span, for example mysql (optional)