Skip to content

Commit 775e400

Browse files
MINOR: [C++] Fix OTel 1.19 compat after silent breaking change (#45859)
### Rationale for this change conda-forge/arrow-cpp-feedstock#1727 fails to build because open-telemetry/opentelemetry-cpp@762b73d is a silent breaking change. ### What changes are included in this PR? Work around the breaking change. ### Are these changes tested? I tested that it built with OTel 1.19 and 1.18. ### Are there any user-facing changes? No Lead-authored-by: David Li <li.davidm96@gmail.com> Co-authored-by: Rossi Sun <zanmato1984@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent b8c9f76 commit 775e400

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cpp/src/arrow/util/tracing_internal.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ class OtlpOStreamExporter final : public sdktrace::SpanExporter {
9797
std::chrono::microseconds(0)) noexcept override {
9898
return exporter_.Shutdown(timeout);
9999
}
100+
// XXX: OTel 1.19 silent breaking change: this must be overridden
101+
bool ForceFlush(std::chrono::microseconds /*timeout*/) noexcept override {
102+
(*out_).flush();
103+
return true;
104+
}
100105

101106
private:
102107
std::basic_ostream<char>* out_;

0 commit comments

Comments
 (0)