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

[EXPORTER] Add logging for async gRPC errors #3108

Merged
merged 4 commits into from
Oct 24, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion exporters/otlp/src/otlp_grpc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static sdk::common::ExportResult InternalDelegateAsyncExport(
stub->experimental_async()
# endif
->Export(call_data->grpc_context.get(), call_data->request, call_data->response,
[call_data, async_data](::grpc::Status grpc_status) {
[call_data, async_data, export_data_name](::grpc::Status grpc_status) {
--async_data->running_requests;
++async_data->finished_request_counter;

Expand All @@ -216,6 +216,13 @@ static sdk::common::ExportResult InternalDelegateAsyncExport(
{
call_data->export_result = opentelemetry::sdk::common::ExportResult::kSuccess;
}
else
{
OTEL_INTERNAL_LOG_ERROR("[OTLP GRPC Client] ERROR: Export "
<< export_data_name << " failed with status_code: \""
<< grpc_status.error_code() << "\" error_message: \""
<< grpc_status.error_message() << "\"");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR, but we need to figure out some way of throttling, as this can otherwise flood the logs for the non-recoverable issues.

marcalff marked this conversation as resolved.
Show resolved Hide resolved
}

if (call_data->grpc_async_callback)
{
Expand Down
Loading