Skip to content

Commit

Permalink
Merge pull request #1193 from newrelic/kafka-streams-metrics-report-a…
Browse files Browse the repository at this point in the history
…ll-numeric

Kafka Streams: Include missing numeric metrics
  • Loading branch information
obenkenobi authored Mar 28, 2023
2 parents 8d01727 + 5789360 commit b3e5725
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public void run() {
Map<String, Object> eventData = new HashMap<>();
for (final Map.Entry<String, KafkaMetric> metric : nrMetricsReporter.getMetrics().entrySet()) {
Object metricValue = metric.getValue().metricValue();
if (metricValue instanceof Double) {
final float value = ((Double) metricValue).floatValue();
if (metricValue instanceof Number) {
final float value = ((Number) metricValue).floatValue();
if (KAFKA_METRICS_DEBUG) {
AgentBridge.getAgent().getLogger().log(Level.FINEST, "getMetric: {0} = {1}", metric.getKey(), value);
}
Expand Down

0 comments on commit b3e5725

Please sign in to comment.