MicroProfile Telemetry metrics reference list
The MicroProfile Telemetry metrics reference table lists and describes all the metrics that are available for Open Liberty when you enable the MicroProfile Telemetry feature 2.0 or later. Use metric data to effectively monitor the status of your microservice systems.
You can obtain metrics from applications, the Open Liberty runtime, and the Java virtual machine (JVM). They can be gathered and stored in database tools, such as Prometheus, and displayed on dashboards, such as Grafana.
When you enable the MicroProfile Telemetry feature version 2.0 and later, you can manage your logs, metrics, and traces in a standardized way with the OpenTelemetry protocol. For more information, see Enable observability with MicroProfile Telemetry.
Filter metrics to gather only the data you need
By default, all monitoring components are enabled. If your server is collecting more metrics data than you need, you can improve the server performance by collecting only those metrics that you intend to use. To configure only a subset of metrics to be reported, specify the components that you want to monitor in the filter
attribute for the monitor
configuration element in your server.xml
file. You can identify the relevant monitoring component for each metric by referencing the Monitoring component column of the metrics reference tables.
To enable only the monitoring components that are used by MicroProfile Telemetry, add the following code to your server.xml
file.
<monitor filter="ConnectionPool,ThreadPool,RequestTiming,Session,HTTP"/>
To disable all metrics but the Session
metrics, add the following code to your server.xml
file:
<monitor filter="Session"/>
To disable all monitoring components, add the following code to your server.xml
file:
<monitor filter=" "/>
MicroProfile Telemetry 2.0 and later metrics reference
When the MicroProfile Telemetry feature 2.0 and later is enabled, Open Liberty can send metric data to compatible OpenTelemetry protocol (OTLP) receivers. For more information, see Enable observability with MicroProfile Telemetry.
The table lists the metric types, descriptions and attributes that are available for Open Liberty. Where applicable, the associated monitoring component that you can use to filter the metric is also included. The Features required column of the table includes the feature or features that must be enabled to obtain that metric data. The Version introduced column specifies the minimum version of the feature that you must enable to collect the metric.
MicroProfile Telemetry 2.0 name | Attributes | Type and description | Monitoring component | Features required | Version introduced |
---|---|---|---|---|---|
|
| Duration of HTTP server requests. This metric is a Histogram. / (seconds). This histogram has the following explicit bucket boundaries [ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ] | HTTP | ||
io.openliberty.connection_pool.handle.count | io.openliberty.datasource.name="<datasource_name>" | The number of connections that are in use. This number might include multiple connections that are shared from a single managed connection. This metric is an | ConnectionPool | ||
io.openliberty.connection_pool.connection.created | io.openliberty.datasource.name="<datasource_name>" | The total number of managed connections that were created since the pool creation. This metric is an | ConnectionPool | ||
io.openliberty.connection_pool.connection.destroyed | io.openliberty.datasource.name="<datasource_name>" | The total number of managed connections that were destroyed since the pool creation. This metric is an | ConnectionPool | ||
io.openliberty.connection_pool.connection.free | io.openliberty.datasource.name="<datasource_name>" | The number of managed connections that are available. This metric is an | ConnectionPool | ||
io.openliberty.connection_pool.connection.use_time | io.openliberty.datasource.name="<datasource_name>" | The amount of time connections were used for. This metric is an DoubleHistogram / (seconds). This histogram has the following explicit bucket boundaries [ 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5, 10] | ConnectionPool | ||
io.openliberty.connection_pool.connection.count | io.openliberty.datasource.name="<datasource_name>" | The current sum of managed connections in the pool. This sum includes managed connections that are available and those that are in use. A single managed connection that is shared by multiple connections only counts once. This metric is an | ConnectionPool | ||
io.openliberty.connection_pool.connection.wait_time | io.openliberty.datasource.name="<datasource_name>" | The amount of time that connection requests waited for a connection. This metric is an | ConnectionPool | ||
io.openliberty.request_timing.active | n/a | The number of servlet requests that are currently running. This metric is an | RequestTiming | ||
io.openliberty.request_timing.hung | n/a | The number of servlet requests that are currently hung. This metric is an | RequestTiming | ||
io.openliberty.request_timing.processed | n/a | The number of servlet requests since the server started. This metric is an | RequestTiming | ||
io.openliberty.request_timing.slow | n/a | The number of servlet requests that are currently running but are slow. This metric is an | RequestTiming | ||
io.openliberty.session.active | io.openliberty.app.name="<app_name>" | The number of concurrently active sessions. A session is considered active if the application server is processing a request that uses that user session. This metric is an | Session | ||
io.openliberty.session.created | io.openliberty.app.name="<app_name>" | The number of sessions logged in since this metric was enabled. This metric is an | Session | ||
io.openliberty.session.invalidated | io.openliberty.app.name="<app_name>" | The number of sessions logged out since this metric was enabled. This metric is an | Session | ||
io.openliberty.session.invalidated_by_timeout | io.openliberty.app.name="<app_name>" | The number of sessions logged out because of a timeout since this metric was enabled. This metric is an | Session | ||
io.openliberty.session.live | io.openliberty.app.name="<app_name>" | The number of users that are currently logged in. This metric is an | Session | ||
io.openliberty.threadpool.active_threads | io.openliberty.threadpool.name="<pool_name>" | The number of threads that are actively running tasks. This metric is an | ThreadPool | ||
io.openliberty.threadpool.size | io.openliberty.threadpool.name="<pool_name>" | The size of the thread pool. This metric is an | ThreadPool | ||
jvm.memory.used | vm.memory.pool.name="<pool_name>" , -jvm.memory.type=<memory_type> | Measure of memory used. This metric is an | n/a | ||
jvm.memory.committed |
| Measure of memory committed. This metric is an | n/a | ||
jvm.memory.limit |
| Measure of max obtainable memory. This metric is an | n/a | ||
jvm.memory.used_after_last_gc |
| Measure of memory used, as measured after the most recent garbage collection event on this pool. This metric is an | n/a | ||
jvm.gc.duration |
| Duration of JVM garbage collection actions. This metric is an Histogram. / (seconds). This histogram has the following explicit bucket boundaries [ 0.01, 0.1, 1, 10 ] | n/a | ||
jvm.thread.count |
| Number of executing platform threads. This metric is an | n/a | ||
jvm.class.loaded | n/a | Number of classes loaded since JVM start. This metric is a Counter. / ({class}) | n/a | ||
jvm.class.unloaded | n/a | Number of classes unloaded since JVM start. This metric is a Counter. / ({class}) | n/a | ||
jvm.class.count | n/a | Number of classes currently loaded. This metric is an | n/a | ||
jvm.cpu.time | n/a | CPU time used by the process as reported by the JVM. This metric is a Counter | n/a | ||
jvm.cpu.count | n/a | Number of processors available to the Java virtual machine. This metric is an | n/a | ||
jvm.cpu.recent_utilization | n/a | Recent CPU utilization for the process as reported by the JVM. This metric is a Gauge. | n/a |