Open sirianni opened 1 year ago
cc: jmx-metrics component owners @breedx-splk @Mrod1598 @rmfitzpatrick @dehaansa
I was able to repeat the test and verify the behavior (warning is emitted).
https://github.com/open-telemetry/opentelemetry-java-contrib/pull/253 was opened to resolve this issue but there was pushback to the workaround and I wasn't able to track down the issue in how we interact w/ the sdk (or if it was in sdk itself). cc @aunshc for prioritization.
Is the issue that the name
tag on the MBean may not be unique?
["name" : { mbean -> mbean.name().getKeyProperty("name") }],
?
@sirianni the issue is that the existing code will register a new callback each time metrics are collected, which each attempts to record the metric value collected when that callback was registered. I believe i've resolved this (and several other issues) in https://github.com/open-telemetry/opentelemetry-java-contrib/pull/949
Component(s)
jmx-metrics
What happened?
Description
Using JMX Gatherer
otel.mbeans
to match a collection of MBeans consistently emits the warningInstrument ...has recorded multiple values for the same attributes
Steps to Reproduce
Run
jmx-gatherer
with the following configuration:(Groovy script snippet copied from jvm metrics)
Expected Result
I expected no warnings to be logged
Actual Result
I got warning messages
WARNING: Instrument jvm.gc.collections.count has recorded multiple values for the same attributes.
Component version
1.27.0-alpha
Log output
No response
Additional context
No response