Skip to content

Commit

Permalink
[EXPORTER] Add logging for async gRPC errors (#3108)
Browse files Browse the repository at this point in the history
  • Loading branch information
santigimeno authored Oct 24, 2024
1 parent 751ba5b commit 9947619
Showing 1 changed file with 8 additions and 1 deletion.
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() << "\"");
}

if (call_data->grpc_async_callback)
{
Expand Down

1 comment on commit 9947619

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp api Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 9947619 Previous: 751ba5b Ratio
BM_SpinLockThrashing/4/process_time/real_time 2.0586093266805015 ms/iter 0.6330013275146484 ms/iter 3.25

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.