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 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested
Milestone

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
@tomsun28
Copy link
Contributor

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

hi, thanks for feedback. i think it is a bug, we should response failed when exception happen in kafka like others collect.

@tomsun28 tomsun28 added bug Something isn't working good first issue Good for newcomers labels Jan 19, 2025
@tomsun28 tomsun28 added this to the 1.7.0 milestone Jan 19, 2025
@Rancho-7
Copy link
Contributor Author

hi, thanks for feedback. i think it is a bug, we should response failed when exception happen in kafka like others collect.

Hi Tom,thanks for the response.I will try to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers question Further information is requested
Projects
Development

No branches or pull requests

2 participants