Relates to open-telemetry/opentelemetry-java-contrib#2362
Using weaver yaml as source of truth and generating JMX metrics yaml from it adds extra complexity.
We could however easily extend the JMX metrics yaml and generate the weaver yaml directly from it, which also provides the following benefits:
- minimal impact on current implemetation
- should be quite straightforward to generate the weaver yaml
- allows to generate weaver yaml with user-provided JMX metrics definitions
- allows to reuse the feature directly into
jmx-scraper in contrib, hence allowing to easily cover all the "legacy" definitions that are close to the deprecated "jmx-gatherer"
- should be integrated into the current build system
EDIT: found that it might be easier to implement once #15220 is merged as it helps to provide a high-level API for JMX metrics without exposing the internal implementation.
Relates to open-telemetry/opentelemetry-java-contrib#2362
Using weaver yaml as source of truth and generating JMX metrics yaml from it adds extra complexity.
We could however easily extend the JMX metrics yaml and generate the weaver yaml directly from it, which also provides the following benefits:
jmx-scraperin contrib, hence allowing to easily cover all the "legacy" definitions that are close to the deprecated "jmx-gatherer"EDIT: found that it might be easier to implement once #15220 is merged as it helps to provide a high-level API for JMX metrics without exposing the internal implementation.