diff --git a/jmx-metrics/src/main/groovy/io/opentelemetry/contrib/jmxmetrics/MBeanHelper.groovy b/jmx-metrics/src/main/groovy/io/opentelemetry/contrib/jmxmetrics/MBeanHelper.groovy index e8eec8542..935311479 100644 --- a/jmx-metrics/src/main/groovy/io/opentelemetry/contrib/jmxmetrics/MBeanHelper.groovy +++ b/jmx-metrics/src/main/groovy/io/opentelemetry/contrib/jmxmetrics/MBeanHelper.groovy @@ -117,11 +117,11 @@ class MBeanHelper { def ofInterest = isSingle ? [mbeans[0]]: mbeans return [ofInterest, attributes].combinations().collect { pair -> def (bean, attribute) = pair - new Tuple3(bean, attribute, getBeanAttributeTransform(bean, attribute)) + new Tuple3(bean, attribute, getBeanAttributeWithTransform(bean, attribute)) } } - Object getBeanAttributeTransform(GroovyMBean bean, String attribute){ + Object getBeanAttributeWithTransform(GroovyMBean bean, String attribute){ def transformationClosure = attributeTransformation.get(attribute); return transformationClosure != null ? transformationClosure(bean) : getBeanAttribute(bean, attribute) }