opentelemetry-java-contrib
opentelemetry-java-contrib copied to clipboard
JMX Metrics Gatherer should be able to specify both `jmx.target.system` and `jmx.groovy.script`
Component(s)
jmx-metrics
Is your feature request related to a problem? Please describe.
I'd like to collect both jvm
metrics and custom application metrics with a single instance of JMX Metrics Gatherer
.
otel.jmx.service.url=service:jmx:rmi:///jndi/rmi://jetty:7203/jmxrmi
otel.jmx.target.system=jvm
otel.jmx.groovy.script=/script.groovy
This configuration yields an error
Exception in thread "main" io.opentelemetry.contrib.jmxmetrics.ConfigurationException: Only one of otel.jmx.groovy.script or otel.jmx.target.system can be specified.
Describe the solution you'd like
I'd like the ability to specify both options.
It looks like the code already supports multiple scripts so it should be a relatively simple change.
Describe alternatives you've considered
Running multiple JMX Gatherer instances. This requires more configuration and is an inefficient use of resources.
Additional context
No response
cc: jmx-metrics component owners @breedx-splk @Mrod1598 @rmfitzpatrick @dehaansa
Hello! Is this up for grabs?
@BassemElMasry are you still working on this? If not, I believe I have a solution