Skip to content

Commit

Permalink
Fix compile problem without ENABLE_ASYNC_EXPORT
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Nov 16, 2023
1 parent 3cc2776 commit aeb7b55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exporters/otlp/src/otlp_grpc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ static std::string GetFileContentsOrInMemoryContents(const std::string &file_pat
return contents;
}

#ifdef ENABLE_ASYNC_EXPORT
static void MaybeSpawnBackgroundThread(std::shared_ptr<OtlpGrpcClientAsyncData> async_data)
{
std::lock_guard<std::mutex> lock_guard{async_data->background_thread_m};
Expand Down Expand Up @@ -304,7 +305,7 @@ static sdk::common::ExportResult InternalDelegateAsyncExport(

return opentelemetry::sdk::common::ExportResult::kSuccess;
}

#endif
} // namespace

#ifdef ENABLE_ASYNC_EXPORT
Expand Down Expand Up @@ -622,6 +623,7 @@ bool OtlpGrpcClient::Shutdown(std::chrono::microseconds timeout) noexcept
{
return true;
}
is_shutdown_ = true;

async_data_->cq.Shutdown();
return ForceFlush(timeout);
Expand Down

0 comments on commit aeb7b55

Please sign in to comment.