You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2025/09/10 01:05:00 UTC

[jira] [Updated] (KAFKA-19398) Error getting oldest-iterator-open-since-ms causes NPE in micrometer

     [ https://issues.apache.org/jira/browse/KAFKA-19398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias J. Sax updated KAFKA-19398:
------------------------------------
    Affects Version/s: 3.8.2

> Error getting oldest-iterator-open-since-ms causes NPE in micrometer
> --------------------------------------------------------------------
>
>                 Key: KAFKA-19398
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19398
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 3.8.2, 3.9.1, 4.0.0
>            Reporter: Arne Klein
>            Assignee: Matthias J. Sax
>            Priority: Major
>             Fix For: 4.0.1, 4.1.0
>
>
> After the fix for https://issues.apache.org/jira/browse/KAFKA-17954 was applied, Micrometer can now run into a null pointer exception when reading the `kafka.stream.state.oldest.iterator.open.since.ms` metric.
> java.lang.NullPointerException: Cannot invoke "java.lang.Number.doubleValue()" because the return value of "org.apache.kafka.common.Metric.metricValue()" is null
> 	at io.micrometer.core.instrument.binder.kafka.KafkaMetrics.toDouble(KafkaMetrics.java:326) ~[micrometer-core-1.14.7]
> 	at io.micrometer.core.instrument.binder.kafka.KafkaMetrics.lambda$toMetricValue$6(KafkaMetrics.java:322) ~[micrometer-core-1.14.7]
> While the NPE can also be fixed in [Micrometer|https://github.com/micrometer-metrics/micrometer/issues/6324#issuecomment-2960557766], I'm unsure if this is the intended behaviour for emitting metrics. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)