-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
JMX Insights supports some values for otel.jmx.target.system, those are defined in YAML files here.
JMX Gatherer (in contrib) supports more values of otel.jmx.target.system, those are defined in Groovy scripts here.
While the Groovy scripts are convenient, moving to YAML seems a more future-proof solution:
- removes security risk of having executable groovy scripts
- YAML syntax is already widespread and usually do not require java/groovy knowledge
- YAML syntax could later allow to inline the configuration in a global OpenTelemetry YAML configuration when such would be available, for now it has to be stored in a separate file.
Merging both implementations and bringing them to feature parity means that we have to attempt migrate/align all of the JMX Gatherer supported systems and ensure they can be implemented with YAML. Doing so will highlight any missing feature of the YAML implementation by adding any missing part.
Once the alignment is complete, we should then be able to start on the next step: building a "JMX Scraper" in contrib based on the YAML implementation in instrumentation.
For each system listed below, we need to ensure the following with JMX Insights
- add YAML if system is not supported yet
- convert groovy metrics to their YAML equivalent
- deal with any found inconsistency for existing metrics by choosing to
- leave them as-is
- fix YAML or Groovy definitions (or both)
- add any missing feature to YAML implementation if needed
List of systems to cover:
- activemq activemq.groovy
- cassandra cassandra.groovy
- mapping differences, nothing available in YAML
- hadoop hadoop.groovy
- hbase hbase.groovy
- mapping differences there is no YAML definition
- jetty jetty.groovy
- jvm jvm.groovy
- kafka kafka.groovy
- mapping seems identical (but to be checked in detail)
- kafka-consumer kafka-consumer.groovy
- no mapping in YAML
- kafka-producer kafka-producer.groovy
- no mapping in YAML
- solr solr.groovy
- no mapping in YAML
- tomcat tomcat.groovy
- wildfly wildfly.groovy
Once feature parity is achieved and JMX Scraper allows to capture both:
- current JMX Gatherer metrics
- current JMX Insight metrics (maybe as opt-in)
Then we can start the next step to enhance and align the metrics as the initial attempt in #11621
When doing so, special care should be taken to ensure that we conform to current guidelines for metrics defined here, for example:
- units using
{noun}instead of 1 - metric name with a namespace
- metric attributes with a namespace
- maybe defining a common strategy to map existing JMX metrics with minimal definition (for example stay close to MBean attribute name by default, but it's just a random thought)
Follow-up tasks
- open issue to enhance jmx metrics (maybe system per system)