-
Notifications
You must be signed in to change notification settings - Fork 438
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
OTLP HTTP exporter errors are never reported #1578
Comments
I think maybe this patch is about correct to fix the issue?
|
Good catch. Yes, the status code handling seems to be missing. The patch look good to log the error. As of now, we don't report the status code to the calling framework (i.e, HTTP exporter), which probably needs to be changed when we decide to start supporting retrying failed requests (say in the case the status code is 500, 409 or 428). cc @owent Also, do you plan to contribute this patch :) |
Yes, patch is welcome:) Should all 2xx be considered as success? |
I wasn't sure how to handle non-200 success codes. The OTEL spec says that a collector must return 200. So I think it's up to the project to decide whether to be permissive or strictly conforming. |
I think we can keep 200 as a success in that case. That's what other languages - java, js and go - are doing it too :) |
Agree, All 2xx are successful responses of HTTP. |
Would be good to fix it for elastic search log exporter too:
Zipkin exporter uses Sync HTTP Client, and it is already having the check for HTTP status codes 200 and 202, so should be good. |
@owent please feel free. I am not very familiar with how to do these things on github.com. |
Sorry, I've had a lot going on recently, and I will raise a PR tomorrow. |
Describe your environment
nothing relevant
Steps to reproduce
Configure the http exporter with an URL that will parse correctly but will report errors, e.g. 404 because of an invalid export path
What is the expected behavior?
I expected to see something in the log (at least DEBUG) about a failure to export
What is the actual behavior?
A log line:
[OTLP HTTP Client] DEBUG: Export 1 trace span(s) success
Additional context
n/a
I'm not sure if this should be considered a bug report or a feature request. But it's very surprising to me that a misconfigured
OtlpHttpClientOptions.url
can result in no errors. In my case I had the right http address but an incorrect path, and the collector was replying with a 404. This error showed up nowhere.I can see that the
otlp_http_client.cc
'sResponseHandler::OnResponse
does see the 404, but withoutconsole_debug_
set this isn't even logged. TheOnResponse
function returnsvoid
so it doesn't seem to have a way to report this error to the calling framework.I expected at least an
OTEL_INTERNAL_LOG_DEBUG
fromOnRespnse()
about the error, but ideally it would actually return a status to the framework that was propagated to the return value fromExport()
.The text was updated successfully, but these errors were encountered: