MicroProfile Metrics 1.1 vendor metrics

You can include server component metrics in mpMetrics-1.1 output.

Open Liberty Documentation for the MicroProfile Metrics feature versions 2.0 and later is available on the Open Liberty website.

When both the monitor-1.0 and mpMetrics-1.1 features are enabled, metrics from the following runtime components are included in the /metrics output.

These metrics are provided in the MicroProfile metrics vendor scope. The following example illustrates the output when /metrics is called.
{
    "vendor": {
        "threadpool.Default_Executor.activeThreads": 1,
        "threadpool.Default_Executor.size": 24,
        ...
    },
    "base": {
        "classloader.totalLoadedClass.count": 6824,
        "cpu.systemLoadAverage": 3.05078125,
        ...
    }
}
The following example illustrates the generated Prometheus text for threadpool metrics.
# TYPE vendor:threadpool_default_executor_size gauge     
# HELP vendor:threadpool_default_executor_size The size of the thread pool.
vendor:threadpool_default_executor_size 24
# TYPE vendor:threadpool_default_executor_active_threads gauge
# HELP vendor:threadpool_default_executor_active_threads The number of threads that are actively executing tasks.
vendor:threadpool_default_executor_active_threads 1
Note: If the /metrics and /metrics/vendor URLs do not return the metrics that you are expecting, check the following.
  • Ensure that both the mpMetrics-1.1 and monitor-1.0 features are enabled.
  • Ensure that the servlet or data source have been used in this server.
  • If you are using the filter attribute for monitor-1.0, ensure that the filter includes the components you expect .

Web application metrics

The following table lists the web application metrics.
Note: Substitute the % with the name of a ServletStats MXBean instance.
ServletStats MXBean attribute Counter name Display name Description Type Unit
RequestCount servlet.%s.request.total Total requests The total number of visits to this servlet since the start of the server. Counter None
ResponseTimeDetails servlet.%s.responseTime.total Total response time The total of the servlet response time since the start of the server. Gauge Nanoseconds

ThreadPool metrics

The following table lists the threadpool metrics.
Note: Substitute the % with the name of a ThreadPoolStats MXBean instance.
ThreadPoolStats MXBean attribute Counter name Display name Description Type Unit
ActiveThreads threadpool.%s.activeThreads Active threads The number of threads that are actively running tasks. Gauge None
PoolSize threadpool.%s.poolSize Thread Pool Size The size of the thread pool. Gauge None

Session management metrics

The following table lists the session management metrics.
Note: Substitute the % with the name of a SessionStats MXBean instance.
SessionStats MXBean attribute Counter name Display name Description Type Unit
CreateCount session.%s.create.total Total create count. The number of sessions that have logged in since this metric was enabled. Counter None
LiveCount session.%s.liveSessions Live sessions count The number of users that are currently logged in since the metric was enabled. Gauge None
ActiveCount session.%s.activeSessions Active sessions count The number of concurrently active sessions.
Note: A session is considered active if WebSphere Application Server is processing a request that uses that user session.
Gauge None
InvalidatedCount session.%s.invalidated.total Total invalidated sessions count. The number of sessions that have logged out since this metric was enabled. Counter None
InvalidatedCountbyTimeout session.%s.invalidatedbyTimeout.total Total invalidated sessions by timeout count. The number of sessions that have logged out by timeout since this metric was enabled. Counter None

ConnectionPool metrics

The following table lists the connectionPool metrics.
Note: Substitute the % with the name of a ConnectionPoolStats MXBean instance.
ConnectionPoolStats MXBean attribute Counter name Display name Description Type Unit
CreateCount connectionpool.%s.create.total Create count. The total number of managed connections that were created since the pool creation. Counter None
DestroyCount connectionpool.%s.destroy.total Destroy count. The total number of managed connections that were destroyed since pool creation. Counter None
ManagedConnectionCount connectionpool.%s.managedConnections Managed connections count The current sum of managed connections in the free, shared, and unshared pools. Gauge None
ConnectionHandleCount connectionpool.%s.connectionHandles Connection handles count. The number of connections that are in use. This number might include multiple connections that are shared from a single managed connection. Gauge None
FreeConnectionCount connectionpool.%s.freeConnections Free connections count The number of managed connections in the free pool. Gauge None
WaitTimeDetails connectionpool.%s.waitTime.total Total Wait Time The total wait time on all connection requests since the start of the server. Gauge Milliseconds
WaitTimeDetails connectionpool.%s.queuedRequests.total Total Queued Requests Count The total number of connection requests that had to wait for a connection because of a full connection pool since the start of the server. Counter None
InUseTimeDetails connectionpool.%s.inUseTime.total Total In Use Time The total time that all connections are in-use since the start of the server. Gauge Milliseconds
InUseTimeDetails connectionpool.%s.usedConnections.total Used Connections The total number of connection requests that waited because of a full connection pool or did not have to wait since the start of the server. Any connections that are currently in use are not included in this total. Counter None

JAX-WS metrics

The following table lists the JAX-WS metrics.
Note: Substitute the endpoint in the Counter name with either server or client. Substitute the % symbols with the serviceURL.serviceName.servicePort of a JAX-WS MXBean instance.
JAX-WS MXBean attribute Counter name Display name Description Type Unit
NumInvocations jaxws.endpoint.%s.invocations.total Total Endpoint Invocations Count The number of invocations to this endpoint or operation. Counter None
NumCheckedApplicationFaults jaxws.endpoint.%s.checkedApplicationFaults.total Total Checked Application Faults Count The number of checked application faults. Counter None
NumLogicalRuntimeFaults jaxws.endpoint.%s.logicalRuntimeFaults.total Total Logical Runtime Faults Count The number of logical runtime faults. Counter None
NumRuntimeFaults jaxws.endpoint.%s.runtimeFaults.total Total Runtime Faults Count The number of runtime faults. Counter None
NumUnCheckedApplicationFaults jaxws.endpoint.%s.uncheckedApplicationFaults.total Total Unchecked Application Faults Count The number of unchecked application faults. Counter None
TotalHandlingTime jaxws.endpoint.%s.responseTime.total Total Response Time The total response handling time since the start of the server. Gauge Milliseconds