You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`otel.instrumentation.runtime-telemetry.emit-experimental-metrics`| Boolean |`false`| Enable the capture of experimental metrics. |
6
-
|`otel.instrumentation.runtime-telemetry.experimental.prefer-jfr`| Boolean |`false`| Prefer JFR over JMX for metrics where both collection methods are available (Java 17+). |
7
-
|`otel.instrumentation.runtime-telemetry.experimental.package-emitter.enabled`| Boolean |`false`| Enable creating events for JAR libraries used by the application. |
8
-
|`otel.instrumentation.runtime-telemetry.experimental.package-emitter.jars-per-second`| Integer | 10 | The number of JAR files processed per second. |
3
+
| System property | Type | Default | Description |
|`otel.instrumentation.runtime-telemetry.emit-experimental-metrics`| Boolean |`false`| Enable the capture of experimental JMX-based metrics. |
6
+
|`otel.instrumentation.runtime-telemetry.emit-experimental-jfr-metrics`| Boolean |`false`| Enable the capture of experimental JFR-based metrics on Java 17+. |
7
+
|`otel.instrumentation.runtime-telemetry.experimental.prefer-jfr`| Boolean |`false`| Prefer JFR over JMX for metrics available from both sources, on Java 17+. |
8
+
|`otel.instrumentation.runtime-telemetry.experimental.package-emitter.enabled`| Boolean |`false`| Enable creating events for JAR libraries used by the application. |
9
+
|`otel.instrumentation.runtime-telemetry.experimental.package-emitter.jars-per-second`| Integer | 10 | The number of JAR files processed per second. |
9
10
10
11
## Deprecated Properties (to be removed in 3.0)
11
12
12
-
| System property | Type | Default | Description |
|`otel.instrumentation.runtime-telemetry.capture-gc-cause`| Boolean |`false`| Enable the capture of the jvm.gc.cause attribute. Will always be captured in 3.0. |
15
-
|`otel.instrumentation.runtime-telemetry.emit-experimental-telemetry`| Boolean |`false`| Use `emit-experimental-metrics` instead. |
16
-
|`otel.instrumentation.runtime-telemetry.package-emitter.enabled`| Boolean |`false`| Use `experimental.package-emitter.enabled` instead. |
17
-
|`otel.instrumentation.runtime-telemetry.package-emitter.jars-per-second`| Integer | 10 | Use `experimental.package-emitter.jars-per-second` instead. |
18
-
|`otel.instrumentation.runtime-telemetry-java17.enabled`| Boolean |`false`| Deprecated. Use `emit-experimental-metrics`for experimental JFR features.|
19
-
|`otel.instrumentation.runtime-telemetry-java17.enable-all`| Boolean |`false`| Deprecated. Use `emit-experimental-metrics` and `experimental.prefer-jfr`.|
13
+
| System property | Type | Default | Description |
|`otel.instrumentation.runtime-telemetry.capture-gc-cause`| Boolean |`false`| Enable the capture of the jvm.gc.cause attribute. Will always be captured in 3.0. |
16
+
|`otel.instrumentation.runtime-telemetry.emit-experimental-telemetry`| Boolean |`false`| Use `emit-experimental-metrics` instead. |
17
+
|`otel.instrumentation.runtime-telemetry.package-emitter.enabled`| Boolean |`false`| Use `experimental.package-emitter.enabled` instead. |
18
+
|`otel.instrumentation.runtime-telemetry.package-emitter.jars-per-second`| Integer | 10 | Use `experimental.package-emitter.jars-per-second` instead. |
19
+
|`otel.instrumentation.runtime-telemetry-java17.enabled`| Boolean |`false`| Deprecated. Use `emit-experimental-jfr-metrics`instead. |
20
+
|`otel.instrumentation.runtime-telemetry-java17.enable-all`| Boolean |`false`| Deprecated. Use `experimental.prefer-jfr` and `emit-experimental-jfr-metrics` instead. |
metrics from JFR instead of JMX wherever a JFR equivalent exists (see
103
+
[JFR-based (Overlap with JMX)](#jfr-based-overlap-with-jmx) below). The corresponding
104
+
JMX metrics are suppressed.
105
+
106
+
> **Warning**: JFR events might not be available for all JVMs or with a GraalVM native
107
+
> image, therefore limiting the produced metrics. The original implementation was done
108
+
> for Hotspot. OpenJ9 currently (Nov. 2025) only has the VM-level JFR implementation. So
109
+
> events emitted at the Java level (ie. in jdk.jfr) will not be present. Meaning,
110
+
> jdk.SocketRead, jdk.SocketWrite won't work.
111
+
90
112
### Stable Metrics (enabled by default)
91
113
92
114
These metrics are collected via JMX on all Java versions:
@@ -107,9 +129,7 @@ These metrics are collected via JMX on all Java versions:
107
129
108
130
### Experimental Metrics
109
131
110
-
These metrics are enabled with `emitExperimentalMetrics()`:
111
-
112
-
**JMX-based (all Java versions):**
132
+
#### JMX-based (all Java versions)
113
133
114
134
| Metric | Description |
115
135
| -------- | ----------- |
@@ -119,12 +139,7 @@ These metrics are enabled with `emitExperimentalMetrics()`:
119
139
| `jvm.memory.init` | Measure of initial memory requested |
120
140
| `jvm.system.cpu.utilization` | System-wide CPU utilization |
121
141
122
-
**JFR-based (Java 17+ only):**
123
-
124
-
> **Warning**: JFR events might not be available for all JVMs or with a GraalVM native image,
125
-
> therefore limiting the produced metrics. The original implementation was done for Hotspot. OpenJ9
126
-
> currently (Nov. 2025) only has the VM-level JFR implementation. So events emitted at the Java
127
-
> level (ie. in jdk.jfr) will not be present. Meaning, jdk.SocketRead, jdk.SocketWrite won't work.
142
+
#### JFR-based (Java 17+ only)
128
143
129
144
| Metric | Description |
130
145
| -------- | ----------- |
@@ -134,6 +149,30 @@ These metrics are enabled with `emitExperimentalMetrics()`:
134
149
| `jvm.network.io` | Network I/O bytes |
135
150
| `jvm.network.time` | Network I/O time |
136
151
152
+
#### JFR-based (Overlap with JMX)
153
+
154
+
When `experimental.prefer-jfr=true`, the following metrics are sourced from JFR instead of JMX
155
+
(the JMX-based registration is suppressed to avoid duplicates):
156
+
157
+
| Metric |
158
+
| -------- |
159
+
| `jvm.buffer.count` |
160
+
| `jvm.buffer.memory.limit` |
161
+
| `jvm.buffer.memory.used` |
162
+
| `jvm.class.count` |
163
+
| `jvm.class.loaded` |
164
+
| `jvm.class.unloaded` |
165
+
| `jvm.cpu.count` |
166
+
| `jvm.cpu.recent_utilization` |
167
+
| `jvm.gc.duration` |
168
+
| `jvm.memory.committed` |
169
+
| `jvm.memory.init` |
170
+
| `jvm.memory.limit` |
171
+
| `jvm.memory.used` |
172
+
| `jvm.memory.used_after_last_gc` |
173
+
| `jvm.system.cpu.utilization` |
174
+
| `jvm.thread.count` |
175
+
137
176
## Garbage Collector Dependent Metrics
138
177
139
178
The attributes reported on the memory metrics (`jvm.memory.*`) and gc metrics (`jvm.gc.*`) are dependent on the garbage collector used by the application, since each garbage collector organizes memory pools differently and has different strategies for reclaiming memory during garbage collection.
Copy file name to clipboardExpand all lines: instrumentation/runtime-telemetry/library/src/main/java/io/opentelemetry/instrumentation/runtimetelemetry/RuntimeTelemetryBuilder.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,9 @@ public final class RuntimeTelemetryBuilder {
Copy file name to clipboardExpand all lines: instrumentation/runtime-telemetry/library/src/main/java/io/opentelemetry/instrumentation/runtimetelemetry/internal/Cpu.java
+1-14Lines changed: 1 addition & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,6 @@
10
10
importio.opentelemetry.api.metrics.Meter;
11
11
importjava.util.ArrayList;
12
12
importjava.util.List;
13
-
importjava.util.function.IntSupplier;
14
13
importjava.util.function.Supplier;
15
14
importjavax.annotation.Nullable;
16
15
@@ -33,16 +32,12 @@ public class Cpu {
33
32
/** Register observers for java runtime CPU metrics. */
Copy file name to clipboardExpand all lines: instrumentation/runtime-telemetry/library/src/main/java/io/opentelemetry/instrumentation/runtimetelemetry/internal/Experimental.java
+28-3Lines changed: 28 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,17 +19,21 @@ public final class Experimental {
Copy file name to clipboardExpand all lines: instrumentation/runtime-telemetry/library/src/main/java/io/opentelemetry/instrumentation/runtimetelemetry/internal/Internal.java
Copy file name to clipboardExpand all lines: instrumentation/runtime-telemetry/library/src/main/java/io/opentelemetry/instrumentation/runtimetelemetry/internal/JmxRuntimeMetricsFactory.java
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ public static List<AutoCloseable> buildObservables(
Copy file name to clipboardExpand all lines: instrumentation/runtime-telemetry/library/src/main/java17/io/opentelemetry/instrumentation/runtimetelemetry/internal/JfrFeature.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
*
11
11
* <p>Features that overlap with stable JMX-based instrumentation are disabled by default to avoid
12
12
* duplicate metrics. Experimental features (those not marked stable in the semantic conventions)
13
-
* are also disabled by default and require {@code emit_experimental_metrics=true} to enable.
13
+
* are also disabled by default and require explicit JFR opt-in to enable.
14
14
*
15
15
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change
0 commit comments