MCPcopy Create free account
hub / github.com/apache/arrow / Export

Method Export

cpp/src/arrow/telemetry/logging.cc:67–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 }
66
67 otel::sdk::common::ExportResult Export(
68 const otel_span<std::unique_ptr<otel::sdk::logs::Recordable>>& records) noexcept
69 override {
70 otel::proto::collector::logs::v1::ExportLogsServiceRequest request;
71 otel::exporter::otlp::OtlpRecordableUtils::PopulateRequest(records, &request);
72
73 for (const auto& logs : request.resource_logs()) {
74 std::string out;
75 auto status =
76 google::protobuf::util::MessageToJsonString(logs, &out, pb_json_options_);
77 if (ARROW_PREDICT_FALSE(!status.ok())) {
78 return otel::sdk::common::ExportResult::kFailure;
79 }
80 (*sink_) << out << std::endl;
81 }
82
83 return otel::sdk::common::ExportResult::kSuccess;
84 }
85
86 bool ForceFlush(std::chrono::microseconds timeout) noexcept override {
87 return exporter_.ForceFlush(timeout);

Callers

nothing calls this directly

Calls 1

okMethod · 0.45

Tested by

no test coverage detected