]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/exporters/jaeger/src/http_transport.h
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / exporters / jaeger / src / http_transport.h
1 #pragma once
2
3 #include "THttpTransport.h"
4 #include "transport.h"
5
6 #include <thrift/protocol/TProtocol.h>
7 #include <thrift/transport/TTransport.h>
8 #include <memory>
9 #include <string>
10
11 OPENTELEMETRY_BEGIN_NAMESPACE
12 namespace exporter
13 {
14 namespace jaeger
15 {
16
17 using TProtocol = apache::thrift::protocol::TProtocol;
18
19 class HttpTransport : public Transport
20 {
21 public:
22 HttpTransport(std::string endpoint, ext::http::client::Headers headers);
23
24 int EmitBatch(const thrift::Batch &batch) override;
25
26 uint32_t MaxPacketSize() const override
27 {
28 // Default to 4 MiB POST body size.
29 return 1 << 22;
30 }
31
32 private:
33 std::shared_ptr<THttpTransport> endpoint_transport_;
34 std::shared_ptr<TProtocol> protocol_;
35 };
36
37 } // namespace jaeger
38 } // namespace exporter
39 OPENTELEMETRY_END_NAMESPACE