Skip to content

Commit

Permalink
Merge pull request #315 from uptane/kafka-metrics-fix
Browse files Browse the repository at this point in the history
Do not cast kafka metrics to Object
  • Loading branch information
simao authored Nov 10, 2023
2 parents 35c0f4b + 4c59090 commit 3e02e27
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class KafkaMetrics extends MetricsReporter {
override def metricChange(metric: KafkaMetric): Unit = try {
metricRegistry.register(
metricName(metric),
new Gauge[Double] {
override def getValue: Double = metric.metricValue().asInstanceOf[Double]
new Gauge[Object] {
override def getValue: Object = metric.metricValue()
})
} catch {
case ex: IllegalArgumentException if ex.getMessage.contains("already exists") =>
Expand Down

0 comments on commit 3e02e27

Please sign in to comment.