[
https://issues.apache.org/jira/browse/KAFKA-9887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124683#comment-17124683
]
Michael Carter commented on KAFKA-9887:
---------------------------------------
This similarly applies to connectors that fail during startup. The
connector-startup-failure-total metric is not updated because [this code
section|[https://github.com/apache/kafka/blob/00a59b392d92b0d6d3a321ef9a53dae4b3a9d030/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConnector.java#L103-L121]]
doesn't propagate the exception back up to the code that would increment the
metric. In fact, it registers as a successful startup instead.
> failed-task-count JMX metric not updated if task fails during startup
> ---------------------------------------------------------------------
>
> Key: KAFKA-9887
> URL: https://issues.apache.org/jira/browse/KAFKA-9887
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
> Affects Versions: 2.4.0, 2.5.0, 2.4.1
> Reporter: Chris Egerton
> Priority: Major
>
> If a task fails on startup (specifically, during [this code
> section|https://github.com/apache/kafka/blob/00a59b392d92b0d6d3a321ef9a53dae4b3a9d030/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java#L427-L468]),
> the {{failed-task-count}} JMX metric is not updated to reflect the task
> failure, even though the status endpoints in the REST API do report the task
> as failed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)