Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ private static void calculateAndRecordValueForAttribute(
JmxDataFetcher.fetch(
objectName, jmxAttributeData.attribute); // should return the [val, ...] here

if (!result.isEmpty()) {
logger.info("Fetched JMX metrics: ", result);
}

logger.trace(
"Size of the JmxDataFetcher.fetch result: {}, for objectName:{} and metricName:{}",
result.size(),
Expand All @@ -209,6 +213,7 @@ private static void calculateAndRecordValueForAttribute(
value += Double.parseDouble(String.valueOf(obj));
}
} catch (RuntimeException e) {
logger.warn("Unexpected value from JMX: " + result, e);
ok = false;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public synchronized void report(TelemetryClient telemetryClient) {
try {
Map<String, Collection<Object>> result = JmxDataFetcher.fetch(objectName, attributes);

if (!result.isEmpty()) {
logger.info("Fetched JMX metrics: ", result);
}

for (Map.Entry<String, Collection<Object>> displayAndValues : result.entrySet()) {
boolean ok = true;
double value = 0.0;
Expand All @@ -46,6 +50,7 @@ public synchronized void report(TelemetryClient telemetryClient) {
value += Double.parseDouble(String.valueOf(obj));
}
} catch (RuntimeException e) {
logger.warn("Unexpected value from JMX: " + displayAndValues, e);
ok = false;
break;
}
Expand Down
Loading