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.jfr.enabled`| Boolean |`false`| Enable the default JFR-based runtime metrics on Java 17+. |
7
+
|`otel.instrumentation.runtime-telemetry.jfr.enable-all`| Boolean |`false`| Enable all JFR-based runtime metrics on Java 17+, including metrics that overlap with JMX. |
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
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. |
15
16
|`otel.instrumentation.runtime-telemetry.emit-experimental-telemetry`| Boolean |`false`| Use `emit-experimental-metrics` instead. |
17
+
|`otel.instrumentation.runtime-telemetry.experimental.prefer-jfr`| Boolean |`false`| Use `jfr.enable-all` instead. |
16
18
|`otel.instrumentation.runtime-telemetry.package-emitter.enabled`| Boolean |`false`| Use `experimental.package-emitter.enabled` instead. |
17
19
|`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`.|
20
+
|`otel.instrumentation.runtime-telemetry-java17.enabled`| Boolean |`false`| Deprecated. Use `jfr.enabled` instead. |
21
+
|`otel.instrumentation.runtime-telemetry-java17.enable-all`| Boolean |`false`| Deprecated. Use `jfr.enable-all` instead. |
sources metrics from JFR instead of JMX wherever a JFR equivalent exists (see
104
+
[JFR-based (Overlap with JMX)](#jfr-based-overlap-with-jmx) below). The corresponding
105
+
JMX metrics are suppressed.
106
+
107
+
> **Warning**: JFR events might not be available for all JVMs or with a GraalVM native
108
+
> image, therefore limiting the produced metrics. The original implementation was done
109
+
> for Hotspot. OpenJ9 currently (Nov. 2025) only has the VM-level JFR implementation. So
110
+
> events emitted at the Java level (ie. in jdk.jfr) will not be present. Meaning,
111
+
> jdk.SocketRead, jdk.SocketWrite won't work.
112
+
90
113
### Stable Metrics (enabled by default)
91
114
92
115
These metrics are collected via JMX on all Java versions:
@@ -107,9 +130,7 @@ These metrics are collected via JMX on all Java versions:
107
130
108
131
### Experimental Metrics
109
132
110
-
These metrics are enabled with `emitExperimentalMetrics()`:
111
-
112
-
**JMX-based (all Java versions):**
133
+
#### JMX-based (all Java versions)
113
134
114
135
| Metric | Description |
115
136
| -------- | ----------- |
@@ -119,12 +140,7 @@ These metrics are enabled with `emitExperimentalMetrics()`:
119
140
| `jvm.memory.init` | Measure of initial memory requested |
120
141
| `jvm.system.cpu.utilization` | System-wide CPU utilization |
121
142
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.
143
+
#### JFR-based (Java 17+ only)
128
144
129
145
| Metric | Description |
130
146
| -------- | ----------- |
@@ -134,6 +150,30 @@ These metrics are enabled with `emitExperimentalMetrics()`:
134
150
| `jvm.network.io` | Network I/O bytes |
135
151
| `jvm.network.time` | Network I/O time |
136
152
153
+
#### JFR-based (Overlap with JMX)
154
+
155
+
When `jfr.enable-all=true`, the following metrics are sourced from JFR instead of JMX
156
+
(the JMX-based registration is suppressed to avoid duplicates):
157
+
158
+
| Metric |
159
+
| -------- |
160
+
| `jvm.buffer.count` |
161
+
| `jvm.buffer.memory.limit` |
162
+
| `jvm.buffer.memory.used` |
163
+
| `jvm.class.count` |
164
+
| `jvm.class.loaded` |
165
+
| `jvm.class.unloaded` |
166
+
| `jvm.cpu.count` |
167
+
| `jvm.cpu.recent_utilization` |
168
+
| `jvm.gc.duration` |
169
+
| `jvm.memory.committed` |
170
+
| `jvm.memory.init` |
171
+
| `jvm.memory.limit` |
172
+
| `jvm.memory.used` |
173
+
| `jvm.memory.used_after_last_gc` |
174
+
| `jvm.system.cpu.utilization` |
175
+
| `jvm.thread.count` |
176
+
137
177
## Garbage Collector Dependent Metrics
138
178
139
179
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
-3Lines changed: 0 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,9 +39,6 @@ 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
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,13 +23,13 @@ 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