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. To learn about the different metric types, see Metric types.
Caution
OpenTelemetry Java Instrumentation 2.x contains a set of breaking changes, introduced as part of recent OpenTelemetry HTTP semantic convention updates. To migrate, see Migration guide for OpenTelemetry Java 2.x metrics.
Application metrics π
The agent of the Splunk Distribution of OpenTelemetry Java collects the following application metrics.
Default metric dimensions π
The following dimensions are automatically added to all metrics exported by the agent:
Dimension |
Description |
---|---|
|
Value of the |
|
Value of the |
|
The Java process identifier (PID). |
|
Identifier of the container, if applicable. |
|
Name of the host. |
|
Value of the |
Supported libraries π
The agent collects the following metrics through the following libraries:
Library/Framework |
Instrumentation |
Supported versions |
---|---|---|
|
Java runtimes version 8 and higher |
|
|
Version 2.0 and higher |
|
|
Version 0.9.5 and higher |
|
|
Version 3.0 and higher |
|
|
Version 11.2.0.4 and higher |
|
|
Version 8.5 and higher |
|
|
Version 20.0 and higher |
JVM metrics π
The Splunk OTel Java agent collects the following Java Virtual Machine (JVM) metrics when metric collection is activated.
ClassLoader metrics π
The agent collects the following ClassLoader metrics:
Metric |
Type |
Description |
---|---|---|
|
UpDown counter |
Number of loaded classes. |
|
Counter |
Total number of unloaded classes since the process started. |
Garbage collection metrics π
The agent collects the following garbage collection (GC) metrics:
Metric |
Type |
Description |
---|---|---|
|
Histogram |
Time spent in concurrent phase, in milliseconds. |
|
Counter |
Increase in the size of the young heap memory pool after 1 garbage collection and before the next. |
Memory metrics π
The agent collects the following memory metrics:
Metric |
Type |
Description |
---|---|---|
|
Counter |
Total number of bytes allocated by JVM threads since the previous data point was emitted. Use the rate per second rollup. |
|
UpDown counter |
An estimate of the number of buffers in the pool. |
|
UpDown counter |
An estimate of the memory that the JVM is using for this buffer pool, in bytes. |
|
UpDown counter |
An estimate of the total capacity of the buffers in this pool, in bytes. |
|
UpDown counter |
Amount of memory available to the JVM, in bytes. |
|
UpDown counter |
Maximum amount of memory available for memory management, in bytes. |
|
UpDown counter |
Amount of used memory, in bytes. |
Thread metrics π
The agent collects the following thread metrics:
Metric |
Type |
Description |
---|---|---|
|
UpDown counter |
Number of live threads, including daemon and nondaemon threads. |
Connection pool metrics π
The Splunk Distribution of OpenTelemetry Java instruments several Java Database Connectivity (JDBC) connection pool implementations:
Apache DBCP2
c3p0
HikariCP
Oracle Universal Connection Pool (UCP)
Tomcat JDBC
Vibur DBCP
Each of the connection pools reports a subset of the following metrics:
Metric |
Type |
Description |
---|---|---|
|
Gauge |
Number of open connections that are in use. |
|
Gauge |
Number of open connections that are idle. |
|
Gauge |
Maximum number of idle open connections allowed. |
|
Gauge |
Minimum number of idle open connections allowed. |
|
Gauge |
Maximum number of open connections allowed. |
|
Gauge |
Number of threads that are waiting for an open connection. |
|
Counter |
Number of connection timeouts that have happened since the application started. |
|
Histogram |
Time it took to create a new connection, in milliseconds. |
|
Histogram |
Time it took to get an open connection from the pool, in milliseconds. |
|
Histogram |
Time between borrowing a connection and returning it to the pool, in milliseconds. |
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 |
---|---|
|
Name of the applications server. For example, |
|
Version of the application server. |
For a list of supported application servers, see the Supported libraries and frameworks.
New metric names π
The following table shows the metrics produced by default by OpenTelemetry Java 2.0 and higher, together with their legacy equivalent from version 1.x.
OTel Java 2.0 metric |
Legacy metric (1.x) |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* This is a Splunk specific metric and itβs not present in the upstream semantic conventions.
Note
The previous table contains metrics generated by default. Additional metrics might be emitted by supported metrics instrumentation, for example when instrumenting application servers.
For more information on the HTTP semantic convention changes, see HTTP semantic convention stability migration guide on GitHub.
Deactivate metrics export π
To turn off logs export to Splunk Observability Cloud, set the OTEL_METRICS_EXPORTER
environment variable or the otel.metrics.exporter
system property to none
.