Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Issues with Exception Propagation and Handling During Metric Collection #2941

Open
Rancho-7 opened this issue Jan 3, 2025 · 0 comments
Labels
question Further information is requested

Comments

@Rancho-7
Copy link
Contributor

Rancho-7 commented Jan 3, 2025

Question

Scenario

In Kafka Clinet Monitor,I didn't start a kafka server localhost,but got a success when detecting the connection.

11 33

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 here

55

Is it a bug? If so,I would like to help fix and optimize it. :)

@Rancho-7 Rancho-7 added the question Further information is requested label Jan 3, 2025
@Rancho-7 Rancho-7 changed the title [Question] Issues with Exception Propagation and Handling During Metric Collection [Bug] Issues with Exception Propagation and Handling During Metric Collection Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant