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.jmx.service.url`| - | mandatory JMX URL to connect to the remote JVM |
42
42
|`otel.jmx.target.system`| - | comma-separated list of systems to monitor, mandatory unless `otel.jmx.config` is set |
43
+
|`otel.jmx.target.source`|`auto`| source of metrics definitions to use for `otel.jmx.target.system`, supported values are `auto`, `instrumentation` and `legacy`|
43
44
|`otel.jmx.config`| empty | comma-separated list of paths to custom YAML metrics definition, mandatory when `otel.jmx.target.system` is not set |
44
45
|`otel.jmx.username`| - | user name for JMX connection, mandatory when JMX authentication is set on target JVM with`com.sun.management.jmxremote.authenticate=true`|
45
46
|`otel.jmx.password`| - | password for JMX connection, mandatory when JMX authentication is set on target JVM with `com.sun.management.jmxremote.authenticate=true`|
@@ -55,22 +56,34 @@ When both `otel.jmx.target.system` and `otel.jmx.config` configuration options a
55
56
56
57
If there is a need to override existing ready-to-use metrics or to keep control on the metrics definitions, using a custom YAML definition with `otel.jmx.config` is the recommended option.
The source of metrics definitions is controlled by `otel.jmx.target.source`:
77
+
78
+
-`auto` (default) : metrics definitions from `instrumentation` with fallback on `legacy` when not available.
79
+
-`legacy` : metrics definitions embedded in jmx-scraper, almost equivalent to [JMX Gatherer](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/jmx-metrics).
80
+
-`instrumentation` : metrics definitions embedded in [instrumentation/jmx-metrics](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/jmx-metrics/library) library
81
+
82
+
Setting the value of `otel.jmx.target.source` allows to fit the following use-cases:
83
+
84
+
-`auto` will ensure that the latest metrics definitions in instrumentation (reference) is being used when available with a fallback on `legacy` otherwise. Metrics definitions will thus be updated whenever the dependency on instrumentation is updated.
85
+
-`legacy` allows to keep using definitions that are very close to JMX Gatherer, this is the recommended option if preserving compatibility is required. Those definitions are in maintenance and are unlikely to evolve over time.
86
+
-`instrumentation` forces using metrics definitions from instrumentation, hence only the reference. Metrics definitions and supported values of `otel.jmx.target.system` will be updated whenever the dependency on instrumentation is updated.
74
87
75
88
The following SDK configuration options are also relevant
Copy file name to clipboardExpand all lines: jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/target_systems/JvmIntegrationTest.java
0 commit comments