Metricsedit
With Elastic APM, you can capture system and process metrics. These metrics will be sent regularly to the APM Server and from there to Elasticsearch
Metric setsedit
CPU/Memory metric setedit
elasticapm.metrics.sets.cpu.CPUMetricSet
This metric set collects various system metrics and metrics of the current process.
if you do not use Linux, you need to install psutil
for this metric set.
-
system.cpu.total.norm.pct
-
type: scaled_float
format: percent
The percentage of CPU time in states other than Idle and IOWait, normalized 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.
-
system.process.memory.size
-
type: long
format: bytes
The total virtual memory the process has.
-
system.process.memory.rss.bytes
-
type: long
format: bytes
The Resident Set Size. The amount of memory the process occupied in main memory (RAM).
Linux’s cgroup metricsedit
-
system.process.cgroup.memory.mem.limit.bytes
-
type: long
format: bytes
Memory limit for current cgroup slice.
-
system.process.cgroup.memory.mem.usage.bytes
-
type: long
format: bytes
Memory usage in current cgroup slice.
Breakdown metric setedit
Tracking and collection of this metric set can be disabled using the breakdown_metrics
setting.
-
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 examplerequest
-
span.type
: The type of the span, for exampleapp
,template
ordb
-
span.subtype
: The sub-type of the span, for examplemysql
(optional)
-
Prometheus metric set (beta)edit
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
If you use prometheus_client
to collect metrics, the agent can
collect them as well and make them available in Elasticsearch.
The following types of metrics are supported:
- Counters
- Gauges
- Summaries
- Histograms (requires APM Server / Elasticsearch / Kibana 7.14+)
To use the Prometheus metric set, you have to enable it with the prometheus_metrics
configuration option.
All metrics collected from prometheus_client
are prefixed with "prometheus.metrics."
. This can be changed using the prometheus_metrics_prefix
configuration option.
Beta limitationsedit
- The metrics format may change without backwards compatibility in future releases.