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
This is currently a work-in-progress component not ready to be used in production.
8
-
The end goal is to provide an alternative to the [JMX Gatherer](../jmx-metrics/README.md) utility.
7
+
This is an alternative to the [JMX Gatherer](../jmx-metrics/README.md) utility.
9
8
10
9
## Usage
11
10
@@ -154,22 +153,22 @@ Like with the JMX Gatherer, the selection of provided metrics to use is still do
154
153
However, there is now two distinct sets of metrics to select from using the `otel.jmx.target.source` configuration option:
155
154
156
155
-`legacy`: [metrics definitions](./src/main/resources) equivalent to JMX Gatherer definitions to help transition and preserve compatibility
157
-
-`instrumentation`: [metrics definitions inherited from instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/), which is now used as a reference for JMX metrics.
156
+
-`instrumentation`: [metrics definitions inherited from instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/), which is now used as a reference for JMX metrics, those also aim to provide better alignment with [metrics semantic conventions](https://opentelemetry.io/docs/specs/semconv/general/metrics/).
158
157
159
158
In both cases, the metrics definitions themselves are embedded in the JMX Scraper binary, thus they
160
159
will only change if the release version of the JMX Scraper binary changes.
161
160
162
161
By default, `otel.jmx.target.source` is `auto`, which means for each value of `otel.jmx.target.system`:
163
162
164
-
-metrics definitions from instrumentation will be used by default, if available
165
-
-legacy metrics definitions equivalent to JMX Gatherer will be used as fallback
166
-
-whenever new metrics definitions are being added or modified in instrumentation, those newer definitions will be used
163
+
-Metrics definitions from instrumentation will be used by default, if available.
164
+
-Legacy metrics definitions equivalent to JMX Gatherer will be used as fallback.
165
+
-Whenever new metrics definitions are being added or modified in instrumentation, those newer definitions will be used.
167
166
168
-
There are multiple strategies depending on the ability or willingness to embrace change in metrics definitions:
167
+
There are multiple possible strategies depending on the ability or willingness to embrace change in metrics definitions:
169
168
170
169
- To preserve maximum compatibility, using `legacy` is the recommended option, however it means to not benefit from future updates and contributions.
171
-
- To only get the most recent definitions, using `instrumentation` ensures that none of the legacy definitions is used, only the "reference" from instrumentation, which could still evolve over time.
172
-
- To embrace newer definitions whenever they become available, using `auto` is the recommended option, however it means the metrics produced could change when updating the version of JMX Scraper.
170
+
- To only get the most recent definitions, using `instrumentation` ensures that none of the legacy definitions is used, only the reference from instrumentation, which could still evolve over time.
171
+
- To embrace reference definitions whenever they become available, using `auto` is the recommended option, however it means the metrics produced could change when updating the version of JMX Scraper.
173
172
- To handle more complex migration strategies or for tight control of metrics definitions, using copies of the YAML metrics definitions and providing them explicitly with `otel.jmx.config` is the recommended option.
0 commit comments