Skip to content

Commit

Permalink
Finish async Export for OtlpHttpClient, OtlpHttpExporter and `Otl…
Browse files Browse the repository at this point in the history
…pHttpLogExporter`.

Add tests for both sync and async exporting.

Signed-off-by: owent <admin@owent.net>
  • Loading branch information
owent committed Mar 23, 2022
1 parent 4c3dc25 commit 8ed3424
Show file tree
Hide file tree
Showing 6 changed files with 492 additions and 332 deletions.
2 changes: 1 addition & 1 deletion exporters/otlp/src/otlp_http_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void OtlpHttpExporter::Export(

proto::collector::trace::v1::ExportTraceServiceRequest service_request;
OtlpRecordableUtils::PopulateRequest(spans, &service_request);
http_client_->Export(service_request, result_callback);
http_client_->Export(service_request, std::move(result_callback));
}

bool OtlpHttpExporter::Shutdown(std::chrono::microseconds timeout) noexcept
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/src/otlp_http_log_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void OtlpHttpLogExporter::Export(
}
proto::collector::logs::v1::ExportLogsServiceRequest service_request;
OtlpRecordableUtils::PopulateRequest(logs, &service_request);
http_client_->Export(service_request, result_callback);
http_client_->Export(service_request, std::move(result_callback));
}

bool OtlpHttpLogExporter::Shutdown(std::chrono::microseconds timeout) noexcept
Expand Down
Loading

0 comments on commit 8ed3424

Please sign in to comment.