Docs » Collect application spans and traces » Instrument Java applications for Splunk Observability Cloud » Metrics and attributes collected by the Splunk OTel Java agent

Metrics and attributes collected by the Splunk OTel Java agent 🔗

The agent of the Splunk Distribution of OpenTelemetry Java collects the following application metrics data and attributes in addition to all that the upstream OpenTelemetry agent collects:

Application metrics 🔗

The agent of the Splunk Distribution of OpenTelemetry Java can collect Java application metrics when metrics collection is enabled. See Metrics settings.

Note

Application metrics collection is an experimental feature subject to future changes.

Default metric dimensions 🔗

The following dimensions are automatically added to all metrics exported by the agent:

Dimension

Description

deployment.environment

Value of the deployment.environment resource attribute, if present.

runtime

Value of the process.runtime.name resource attribute, for example OpenJDK Runtime Environment.

process.pid

The Java process identifier (PID).

service

Value of the service.name resource attribute.

Supported libraries 🔗

The agent collects the following metrics through the following libraries:

Library/Framework

Instrumentation

Supported versions

JVM metrics

jvm-metrics

Java runtimes version 8 and higher

Apache DBCP2 connection pool metrics

commons-dbcp2

Version 2.0 and higher

c3p0 connection pool metrics

c3p0

Version 0.9.5 and higher

HikariCP connection pool metrics

hikaricp

Version 3.0 and higher

Tomcat JDBC connection pool metrics

tomcat-jdbc

Version 8.5 and higher

Vibur DBCP connection pool metrics

vibur-dbcp

Version 20.0 and higher

Tomcat thread pool metrics

tomcat

Version 8.5 and higher

WebSphere Liberty thread pool metrics

liberty

Version 20.0.0.12

WebLogic thread pool metrics

weblogic

Versions 12.x and 14.x

JVM metrics 🔗

The Splunk OTel Java agent collects the following Java Virtual Machine (JVM) metrics when metrics collection is enabled:

ClassLoader metrics 🔗

The agent collects the following ClassLoader metrics:

Metric

Description

runtime.jvm.classes.loaded

Number of loaded classes.

runtime.jvm.classes.unloaded

Total number of unloaded classes since the process starts.

Garbage collection metrics 🔗

The agent collects the following garbage collection (GC) metrics:

Metric

Description

runtime.jvm.gc.concurrent.phase.time

Time spent in concurrent phase.

runtime.jvm.gc.live.data.size

Size of long-lived heap memory pool after reclamation.

runtime.jvm.gc.max.data.size

Maximum size of long-lived heap memory pool.

runtime.jvm.gc.memory.allocated

Increase in the size of the young heap memory pool after one garbage collection and before the next.

runtime.jvm.gc.memory.promoted

Count of positive increases in the size of the old generation memory pool from before to after garbage collection.

runtime.jvm.gc.pause

Time spent in garbage collection pause.

Memory metrics 🔗

The agent collects the following memory metrics:

Metric

Description

runtime.jvm.memory.committed

Amount of memory, in bytes, that’s available to the Java Virtual Machine.

runtime.jvm.memory.max

Maximum amount of memory, in bytes, available for memory management.

runtime.jvm.memory.used

Amount of used memory.

All memory pool metrics share the following tags:

Tag

Value

area

Either heap or nonheap

id

Name of the memory pool. For example, Perm Gen

Thread metrics 🔗

The agent collects the following thread metrics:

Metric

Description

runtime.jvm.threads.daemon

Number of live daemon threads.

runtime.jvm.threads.live

Number of live threads, including both daemon and nondaemon threads.

runtime.jvm.threads.peak

Peak live thread count since the JVM started or peak was reset.

runtime.jvm.threads.states

Number of threads per state as a metric tag.

Connection pool metrics 🔗

The Splunk Distribution of OpenTelemetry Java instruments several Java Database Connectivity (JDBC) connection pool implementations:

  • Apache DBCP2

  • c3p0

  • HikariCP

  • Tomcat JDBC

  • Vibur DBCP

Each of the connection pools reports a subset of the following metrics:

Metric

Description

db.pool.connections

Number of open connections.

db.pool.connections.active

Number of open connections that are in use.

db.pool.connections.idle

Number of open connections that are idle.

db.pool.connections.idle.max

Maximum number of idle open connections allowed.

db.pool.connections.idle.min

Minimum number of idle open connections allowed.

db.pool.connections.max

Maximum number of open connections allowed.

db.pool.connections.pending_threads

Number of threads that are waiting for an open connection.

db.pool.connections.timeouts

Number of connection timeouts that have happened since the application started.

db.pool.connections.create_time

Time it took to create a new connection.

db.pool.connections.wait_time

Time it took to get an open connection from the pool.

db.pool.connections.use_time

Time between borrowing a connection and returning it to the pool.

All connection pool metrics share the following tags:

Tag

Value

pool.name

Name of the connection pool. Spring bean name if Spring is used, JMX object name otherwise.

pool.type

Type or implementation of the connection pool. For example, c3p0, dbcp2, or hikari.

The Splunk Distribution of OpenTelemetry Java instruments the following thread pool implementations:

  • Tomcat connector thread pools

  • WebSphere Liberty web request thread pool

  • Weblogic thread pools

Each of the supported connection pools reports a subset of the following metrics:

Metric

Description

executor.threads

Number of threads in the pool.

executor.threads.active

Number of threads that are executing code.

executor.threads.idle

Number of threads that aren’t executing code.

executor.threads.core

Core thread pool size, expressed as the number of threads that are always kept in the pool.

executor.threads.max

Maximum number of threads in the pool.

executor.tasks.submitted

Total number of tasks submitted to the executor.

executor.tasks.completed

Total number of tasks completed by the executor.

All thread pool metrics have the following tags:

Tag

Value

executor.name

Name of the thread pool.

executor.type

Type/implementation of the connection pool. For example, tomcat, liberty, or weblogic.

WebEngine attributes 🔗

The Splunk Distribution of OpenTelemetry Java captures data about the application server and adds the following attributes to SERVER spans:

Span attribute

Description

webengine.name

Name of the applications server. For example, tomcat.

webengine.version

Version of the application server.

For a list of supported application servers, see the OpenTelemetry documentation at https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md#application-servers.