[Bug] Issues with Exception Propagation and Handling During Metric Collection #2941
Labels
bug
Something isn't working
good first issue
Good for newcomers
question
Further information is requested
Milestone
Question
Scenario
In Kafka Clinet Monitor,I didn't start a kafka server localhost,but got a success when detecting the connection.
Question
When collecting metrics using MetricsCollect#run,
If error occurs,we catch the exception and set the response status to fail.
In the first method,
preCheck
, the exception is thrown and handled correctly.However, in the second method,
collect
(e.g., KafkaCollectImpl), exceptions are handled internally by logging the error, but are not propagated to the calling method. As a result, if an exception occurs during this process, we are unable to correctly set the response status.In this scenario for Kafka,we will get a
TimeOutException
hereIs it a bug? If so,I would like to help fix and optimize it. :)
The text was updated successfully, but these errors were encountered: