-
Notifications
You must be signed in to change notification settings - Fork 1k
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
"Failed to publish metrics to OTLP receiver" error message contains no actionable context #4693
Comments
Thank you for the detailed issue. It sounds like a good enhancement to me. Would you be up for making a pull request for it? |
Let me see what I can do. |
Below is a quick fix; sure thing it needs test cases but Please advise.
|
Looks generally good to me. Logging the response body at warn level could be a bit verbose, though. |
I thought I'm logging resource attributes, not response body - am I missing anything? |
Meanwhile, another diff.
|
Sorry, I mixed up the existing code with what you added in the diff. It looks good to me. For the other diff, let's separate that into another issue so we can track and merge them separately so one doesn't block progress on the other. |
@climategadgets Would you mind creating a PR? |
Of course, will do. |
|
Hopefully, tonight. |
|
Describe the bug
Under some circumstances, a message
Failed to publish metrics to OTLP receiver
with an exception will be logged, usually observed withjava.net.ConnectException: Connection refused
as a root cause.This message does not contain any information that allows to determine where exactly the meter registry is trying to connect, or any other relevant context, for that matter. Since it is possible that the registry is being automatically instantiated by frameworks (Quarkus, Spring, etc.) and that process is usually not logged, the only way to fix the problem is to guess what configuration item needs to be fixed.
Environment
Environment agnostic, here:
micrometer/implementations/micrometer-registry-otlp/src/main/java/io/micrometer/registry/otlp/OtlpMeterRegistry.java
Line 182 in 061dbf6
To Reproduce
How to reproduce the bug:
Have the framework instantiate the registry with no configuration present, or wrong configuration
Expected behavior
Error message must contain enough information to determine what needs to be changed to fix the problem.
Connection to $host:$port refused
Connection to $host:$port refused, check the value of x.y.z configuration keyword
It is understood that "connection refused" may not be the only root cause here. This doesn't change the problem definition - not enough context information to fix the problem.
The text was updated successfully, but these errors were encountered: