Branch data Line data Source code
1 : : #pragma once
2 : :
3 : : #include <hpactor/tracing/trace_exporter.hpp>
4 : :
5 : : #include <string>
6 : :
7 : : namespace hpactor::tracing {
8 : :
9 : : class OtlpHttpExporter final : public SpanExporter {
10 : : public:
11 : : explicit OtlpHttpExporter(std::string endpoint);
12 : : result<void> export_batch(std::span<const SpanRecord> batch) noexcept override;
13 : 0 : void shutdown() noexcept override {}
14 : 0 : const char* name() const noexcept override {
15 : 0 : return "otlp_http";
16 : : }
17 : :
18 : : std::string build_json_payload_for_test(std::span<const SpanRecord> batch,
19 : : const std::string& service_name) const;
20 : :
21 : : private:
22 : : std::string endpoint_;
23 : : };
24 : :
25 : : } // namespace hpactor::tracing
|